/**
 * Upload CSS for Index Page
 * File upload zone, drag & drop, provider selection, and privacy settings
 */

/* Upload Zone Styling */
.upload-zone {
    background: var(--card-background);
    border: none;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        inset 6px 6px 12px rgba(163, 177, 198, 0.3),
        inset -6px -6px 12px rgba(255, 255, 255, 0.7);
}

.upload-zone:hover {
    box-shadow: 
        inset 8px 8px 16px rgba(163, 177, 198, 0.4),
        inset -8px -8px 16px rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
}

.upload-zone.dragover {
    box-shadow: 
        inset 10px 10px 20px rgba(139, 92, 246, 0.3),
        inset -10px -10px 20px rgba(255, 255, 255, 0.9);
    background: rgba(139, 92, 246, 0.05);
}

.upload-zone .bi-cloud-upload {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.8), rgba(124, 58, 237, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upload-zone h4 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Credit Card Providers Section Styling */
.providers-section {
    background: linear-gradient(135deg, rgba(240, 242, 245, 0.8), rgba(226, 232, 240, 0.6));
    padding: 2rem 0;
    margin: 0;
    border-top: 1px solid rgba(163, 177, 198, 0.2);
    border-bottom: 1px solid rgba(163, 177, 198, 0.2);
}

.providers-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.providers-title {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.providers-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.provider-logo {
    background: var(--card-background);
    border: none;
    border-radius: 15px;
    padding: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        4px 4px 8px rgba(163, 177, 198, 0.3),
        -4px -4px 8px rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    width: 100%;
    max-width: 120px;
    text-decoration: none;
    cursor: pointer;
}

.provider-logo:hover {
    transform: translateY(-2px);
    box-shadow: 
        6px 6px 12px rgba(163, 177, 198, 0.4),
        -6px -6px 12px rgba(255, 255, 255, 0.8);
}

.provider-logo img {
    max-width: 100%;
    max-height: 50px;
    width: auto;
    height: auto;
    filter: grayscale(0.3) brightness(0.9);
    transition: filter 0.3s ease;
}

.provider-logo:hover img {
    filter: grayscale(0) brightness(1);
}

/* Compact Providers Section Styling */
.providers-section-compact {
    background: rgba(240, 242, 245, 0.5);
    border-radius: 15px;
    padding: 1rem;
    border: 1px solid rgba(163, 177, 198, 0.2);
    box-shadow: 
        2px 2px 4px rgba(163, 177, 198, 0.2),
        -2px -2px 4px rgba(255, 255, 255, 0.8);
}

.providers-title-compact {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.providers-title-compact i:first-child {
    color: rgba(139, 92, 246, 0.7);
}

.providers-grid-compact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

.provider-logo-compact {
    background: #f8fafc;
    border: none;
    border-radius: 10px;
    padding: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        2px 2px 4px rgba(163, 177, 198, 0.2),
        -2px -2px 4px rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: 70px;
    text-decoration: none;
    cursor: pointer;
}

.provider-logo-compact:hover {
    transform: translateY(-1px);
    box-shadow: 
        3px 3px 6px rgba(163, 177, 198, 0.3),
        -3px -3px 6px rgba(255, 255, 255, 0.9);
}

.provider-logo-compact img {
    max-width: 100%;
    max-height: 30px;
    width: auto;
    height: auto;
    filter: grayscale(0.2) brightness(0.95);
    transition: filter 0.3s ease;
}

.provider-logo-compact:hover img {
    filter: grayscale(0) brightness(1);
}

/* Anonymization Toggle Switch Styling */
.anonymization-toggle-container {
    padding: 12px 16px;
    background: var(--card-background);
    border-radius: 15px;
    box-shadow: 
        inset 3px 3px 6px rgba(163, 177, 198, 0.3),
        inset -3px -3px 6px rgba(255, 255, 255, 0.7);
}

.anonymization-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
    margin: 0;
    cursor: pointer;
}

.toggle-switch input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
}

.slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(124, 58, 237, 0.15));
    border-radius: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        inset 4px 4px 8px rgba(163, 177, 198, 0.4),
        inset -4px -4px 8px rgba(255, 255, 255, 0.8);
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 242, 245, 0.9));
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-switch input:checked + .slider {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(124, 58, 237, 0.8));
    box-shadow: 
        inset 2px 2px 4px rgba(124, 58, 237, 0.3),
        inset -2px -2px 4px rgba(255, 255, 255, 0.2);
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(26px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(248, 250, 252, 1));
}

.toggle-switch input:disabled + .slider {
    opacity: 0.8;
    cursor: not-allowed;
}

.toggle-switch input:disabled {
    cursor: not-allowed;
}

.toggle-switch:has(input:disabled) {
    cursor: not-allowed;
}

.toggle-switch input:disabled ~ .toggle-label {
    opacity: 0.8;
    cursor: not-allowed;
}

.toggle-label {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    user-select: none;
}

.toggle-switch input:checked ~ .toggle-label {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.8), rgba(124, 58, 237, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.anonymization-toggle-container:hover {
    box-shadow: 
        inset 4px 4px 8px rgba(163, 177, 198, 0.4),
        inset -4px -4px 8px rgba(255, 255, 255, 0.8);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .providers-grid {
        gap: 1rem;
        max-width: 400px;
    }
    
    .provider-logo {
        padding: 0.75rem;
        min-height: 60px;
        flex: 0 0 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
    }
    
    .provider-logo img {
        max-height: 40px;
    }
    
    .providers-title {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .providers-section-compact {
        padding: 0.75rem;
    }
    
    .providers-title-compact {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    .providers-grid-compact {
        gap: 0.5rem;
    }
    
    .provider-logo-compact {
        height: 40px;
        width: 60px;
        padding: 0.3rem;
    }
    
    .provider-logo-compact img {
        max-height: 24px;
    }
    
    .anonymization-toggle {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .toggle-switch {
        width: 48px;
        height: 24px;
        flex-shrink: 0;
    }
    
    .toggle-label {
        flex-shrink: 0;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .privacy-tooltip {
        flex-shrink: 0;
        margin-left: 4px;
    }
    
    .slider:before {
        height: 16px;
        width: 16px;
        left: 4px;
        bottom: 4px;
    }
    
    .toggle-switch input:checked + .slider:before {
        transform: translateX(20px);
    }
    
    .anonymization-toggle-container {
        padding: 10px 12px;
    }
    
    /* Provider selection label wrapping */
    .provider-selection .form-label {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.25rem 0;
    }
    
    .provider-selection .form-label i.bi-building {
        margin-right: 0.5rem !important;
    }
    
    .provider-selection .form-label .privacy-tooltip {
        margin-left: 0.5rem;
    }
    
    .provider-selection .form-label .text-muted {
        margin-left: 0 !important;
        flex-basis: 100%;
        margin-top: 0.25rem;
    }
    
    /* Privacy settings section - add more top margin on mobile */
    .col-md-6:has(.form-label:contains("Privacy Settings")),
    .col-md-6:nth-child(2) {
        margin-top: 2rem;
    }
    
    /* Ensure spacing between currency and privacy sections on mobile */
    .currency-select {
        margin-bottom: 1rem;
    }
}