/**
 * NFT Creator Enhanced Security CSS
 * File: /includes/uploaders/nft_creator/nft_creator.css
 * 
 */

/* =====================================================
   SECURE KEY SELECTOR STYLES
   ===================================================== */

.secure-key-container {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #cbd5e0;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.selector-header h4 {
    margin: 0 0 0.5rem 0;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
}

.selector-header .help-text {
    margin: 0 0 1rem 0;
    color: #718096;
    font-size: 0.9rem;
}

/* =====================================================
   SOURCE GRID LAYOUT
   ===================================================== */

.source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.source-option {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.source-option.available:hover {
    border-color: #4299e1;
    background: #ebf8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.15);
}

.source-option.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f7fafc;
}

.source-option.selected {
    border-color: #4299e1;
    background: #ebf8ff;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.source-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.source-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.source-status {
    font-size: 0.8rem;
    color: #718096;
    font-weight: 500;
}

/* =====================================================
   INTERFACE SECTIONS
   ===================================================== */

.source-interface {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.source-interface h5 {
    margin: 0 0 1rem 0;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.interface-section {
    margin-bottom: 1rem;
}

.interface-section:last-child {
    margin-bottom: 0;
}

.interface-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2d3748;
    font-size: 0.9rem;
}

.interface-section input, 
.interface-section select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.interface-section input:focus,
.interface-section select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.interface-section button {
    background: #4299e1;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.interface-section button:hover {
    background: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

.interface-section button:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.interface-section .help-text {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 0.25rem;
    font-style: italic;
}

.instruction-steps {
    background: #f8f9fa;
    border-left: 4px solid #4299e1;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.instruction-steps p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.send-instructions h6 {
    color: #2d3748;
    margin-bottom: 1rem;
}

/* =====================================================
   SECURITY STATUS MESSAGES
   ===================================================== */

.security-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.security-status.success {
    background: #f0fff4;
    color: #38a169;
    border-color: #68d391;
}

.security-status.error {
    background: #fed7d7;
    color: #e53e3e;
    border-color: #fc8181;
}

.security-status.warning {
    background: #fffaf0;
    color: #dd6b20;
    border-color: #f6ad55;
}

/* =====================================================
   BITWARDEN SPECIFIC STYLES
   ===================================================== */

.bitwarden-item {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.75rem;
    margin: 0.5rem 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bitwarden-item:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.bitwarden-item.selected {
    background: #ebf8ff;
    border-color: #4299e1;
}

.bitwarden-item strong {
    display: block;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.bitwarden-item p {
    margin: 0;
    color: #718096;
    font-size: 0.8rem;
}

.bitwarden-item small {
    display: block;
    color: #a0aec0;
    font-size: 0.7rem;
    margin-top: 0.25rem;
}

.bitwarden-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.option-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.option-card:hover {
    border-color: #4299e1;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.15);
}

.option-card h6 {
    margin: 0 0 0.5rem 0;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
}

.option-description {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.security-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.security-warning p {
    margin: 0;
    color: #856404;
    font-size: 0.85rem;
}

.cli-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cli-form label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.cli-form input {
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.cli-form button {
    background: #4299e1;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cli-form button:hover {
    background: #3182ce;
}

@media (min-width: 768px) {
    .bitwarden-options {
        flex-direction: row;
    }
    
    .option-card {
        flex: 1;
    }
}

/* =====================================================
   LOADING AND ANIMATION STYLES
   ===================================================== */

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: #4299e1;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* Pulse animation for loading states */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.5; 
    }
}

/* =====================================================
   ENHANCED FIELD STYLING
   ===================================================== */

.auto-populated-secure {
    background-color: #e6fffa !important;
    border-color: #38b2ac !important;
    position: relative;
}

.secure-field-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #38b2ac;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.locked-field-secure {
    background-color: #f7fafc !important;
    border-color: #e2e8f0 !important;
    cursor: not-allowed !important;
    opacity: 0.8;
}

.locked-field-secure:focus {
    border-color: #e2e8f0 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 768px) {
    .secure-key-container {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    .source-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .source-option {
        min-height: 100px;
        padding: 0.75rem;
    }
    
    .source-interface {
        padding: 1rem;
    }
    
    .interface-section button {
        width: 100%;
        padding: 1rem;
    }
    
    .selector-header h4 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .secure-key-container {
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    .source-option {
        min-height: 80px;
        padding: 0.5rem;
    }
    
    .source-icon {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .source-name {
        font-size: 0.8rem;
    }
    
    .source-status {
        font-size: 0.7rem;
    }
}

/* =====================================================
   ACCESSIBILITY ENHANCEMENTS
   ===================================================== */

.source-option:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

.interface-section button:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

.source-option.unavailable:focus {
    outline-color: #a0aec0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .source-option {
        border-width: 3px;
    }
    
    .source-option.selected {
        border-width: 4px;
    }
    
    .security-status {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .source-option,
    .interface-section button,
    .bitwarden-item {
        transition: none;
    }
    
    .loading-spinner {
        animation: none;
        border-top-color: #4299e1;
    }
    
    .pulse-animation {
        animation: none;
    }
}

/* =====================================================
   DARK MODE SUPPORT (if needed)
   ===================================================== */

@media (prefers-color-scheme: dark) {
    .secure-key-container {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .source-option {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .source-option.available:hover {
        background: #3182ce;
        border-color: #63b3ed;
    }
    
    .source-interface {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .interface-section input,
    .interface-section select {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .bitwarden-item {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
}

/* =====================================================
   PRINT STYLES (hide secure elements)
   ===================================================== */

@media print {
    .secure-key-container,
    .source-interface,
    .security-status {
        display: none !important;
    }
}