/* Cargo Grid Editor Styles */

.grid-editor-panel {
    position: fixed;
    top: 80px;
    right: -400px;
    width: 400px;
    height: calc(100vh - 100px);
    background: rgba(10, 14, 39, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem;
}

.grid-editor-panel.open {
    right: 0;
}

.grid-editor-panel h3 {
    color: var(--accent-gold);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.editor-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.editor-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.editor-form-group {
    margin-bottom: 1.5rem;
}

.editor-form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.editor-form-group input,
.editor-form-group textarea,
.editor-form-group select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.editor-form-group input:focus,
.editor-form-group textarea:focus,
.editor-form-group select:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(244, 162, 97, 0.1);
}

.editor-form-group textarea {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.editor-form-group input[type="number"] {
    -moz-appearance: textfield;
}

.editor-form-group input[type="number"]::-webkit-outer-spin-button,
.editor-form-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.editor-grid-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.editor-info {
    background: rgba(42, 157, 143, 0.1);
    border-left: 3px solid var(--accent-blue);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.editor-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.editor-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-editor-save {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-editor-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(244, 162, 97, 0.3);
}

.btn-editor-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-editor-cancel {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-editor-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-edit-grid {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(244, 162, 97, 0.4);
    transition: all 0.3s;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit-grid:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(244, 162, 97, 0.6);
}

.btn-edit-grid:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.editor-source-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.editor-source-badge.official {
    background: rgba(42, 157, 143, 0.2);
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
}

.editor-source-badge.community {
    background: rgba(244, 162, 97, 0.2);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
}

.editor-source-badge.verified {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.editor-votes {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
}

.vote-btn {
    flex: 1;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.vote-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.vote-btn.upvote:hover {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4CAF50;
}

.vote-btn.downvote:hover {
    background: rgba(244, 67, 54, 0.2);
    border-color: #F44336;
}

@media (max-width: 768px) {
    .grid-editor-panel {
        width: 100%;
        right: -100%;
        top: 60px;
        height: calc(100vh - 60px);
    }
    
    .btn-edit-grid {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}
