/**
 * Credential Transfer Modal Styles
 */

.credential-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.credential-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.credential-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.credential-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.credential-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.credential-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.credential-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.credential-modal-body {
    padding: 28px;
}

.credential-section {
    margin-bottom: 28px;
}

.credential-section h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.credential-section p {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.credential-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.credential-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.credential-btn:active {
    transform: translateY(0);
}

.credential-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.credential-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.credential-btn-secondary:hover {
    background: #e5e7eb;
}

.credential-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-icon {
    font-size: 16px;
}

#import-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    resize: vertical;
    margin-bottom: 16px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

#import-textarea:focus {
    outline: none;
    border-color: #667eea;
}

#import-textarea::placeholder {
    color: #9ca3af;
}

.credential-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.credential-status {
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    min-height: 20px;
}

.credential-status.success {
    background: #d1fae5;
    color: #065f46;
    border-left: 3px solid #10b981;
}

.credential-status.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 3px solid #ef4444;
}

.credential-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.credential-divider::before,
.credential-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #e5e7eb;
}

.credential-divider::before {
    left: 0;
}

.credential-divider::after {
    right: 0;
}

.credential-divider span {
    background: white;
    padding: 0 12px;
    color: #9ca3af;
    font-weight: 500;
    font-size: 14px;
}

.credential-info {
    background: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    line-height: 1.8;
    color: #374151;
    margin-top: 24px;
}

.credential-info strong {
    color: #1f2937;
}

.credential-info code {
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    color: #667eea;
    border: 1px solid #e5e7eb;
}

.credential-modal-footer {
    padding: 16px 28px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 16px 16px;
    text-align: center;
}

.credential-modal-footer small {
    color: #6b7280;
    font-size: 13px;
}

.credential-modal-footer kbd {
    display: inline-block;
    padding: 2px 6px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Responsive design */
@media (max-width: 640px) {
    .credential-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .credential-modal-header {
        padding: 20px;
    }

    .credential-modal-header h2 {
        font-size: 20px;
    }

    .credential-modal-body {
        padding: 20px;
    }

    .credential-actions {
        flex-direction: column;
    }

    .credential-btn {
        width: 100%;
        justify-content: center;
    }

    .credential-modal-footer {
        padding: 12px 20px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .credential-modal-content {
        background: #1f2937;
        color: #f3f4f6;
    }

    .credential-modal-header {
        border-bottom-color: #374151;
    }

    .credential-section h3 {
        color: #f3f4f6;
    }

    .credential-section p {
        color: #9ca3af;
    }

    .credential-btn-secondary {
        background: #374151;
        color: #f3f4f6;
    }

    .credential-btn-secondary:hover {
        background: #4b5563;
    }

    #import-textarea {
        background: #374151;
        border-color: #4b5563;
        color: #f3f4f6;
    }

    #import-textarea:focus {
        border-color: #667eea;
    }

    .credential-divider::before,
    .credential-divider::after {
        background: #4b5563;
    }

    .credential-divider span {
        background: #1f2937;
    }

    .credential-info {
        background: #111827;
        border-color: #374151;
        color: #d1d5db;
    }

    .credential-info strong {
        color: #f3f4f6;
    }

    .credential-info code {
        background: #374151;
        border-color: #4b5563;
    }

    .credential-modal-footer {
        background: #111827;
        border-top-color: #374151;
    }

    .credential-modal-footer kbd {
        background: #374151;
        border-color: #4b5563;
        color: #f3f4f6;
    }
}
