/* Deck Builder Specific Styles */

/* Import/Export Modal */
.import-export-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.import-export-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    z-index: -1;
}

.import-export-modal .modal-content {
    background: #1E2019;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid #363732;
}

.import-export-modal h3 {
    color: #4a90e2;
    margin-bottom: 15px;
    font-size: 24px;
    text-align: center;
}

.import-export-modal p {
    color: #D3D0CB;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
}

.import-export-modal textarea {
    width: 100%;
    height: 120px;
    background: #363732;
    border: 1px solid #555;
    border-radius: 6px;
    color: #D3D0CB;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 20px;
    line-height: 1.4;
}

.import-export-modal textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.3);
}

.import-export-modal textarea::placeholder {
    color: #888;
    font-style: italic;
}

.import-export-modal textarea[readonly] {
    cursor: text;
    user-select: all;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-actions button {
    background: #363732;
    color: #D3D0CB;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
    min-width: 120px;
}

.modal-actions button:hover {
    background: #4a90e2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.modal-actions button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
}

/* Enhanced deck action buttons */
.deck-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.deck-actions .action-group {
    display: flex;
    gap: 8px;
}

.deck-actions button {
    background: #363732;
    color: #D3D0CB;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.deck-actions button:hover:not(:disabled) {
    background: #4a90e2;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.deck-actions button:disabled {
    background: #2a2a2a;
    color: #666;
    cursor: not-allowed;
}

/* Small Import/Export buttons below deck */
.deck-import-export {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #444;
}

.small-button {
    background: #363732;
    color: #D3D0CB;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s ease;
    min-width: 60px;
}

.small-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.export-button {
    background: #2e7d32;
}

.export-button:hover {
    background: #4caf50;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4);
}

.import-button {
    background: #f57c00;
}

.import-button:hover {
    background: #ff9800;
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.4);
}

/* Copy feedback animation */
@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background: #4caf50; }
    100% { transform: scale(1); }
}

.copy-success {
    animation: copySuccess 0.3s ease;
}


/* Responsive design for modal */
@media (max-width: 600px) {
    .import-export-modal .modal-content {
        margin: 20px;
        width: auto;
        padding: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
    }
}

/* Enhanced textarea for deck codes */
.import-export-modal textarea {
    word-break: break-all;
    overflow-wrap: break-word;
}

/* Loading state for import button */
.modal-actions button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.modal-actions button.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}