/**
 * fixes.css - Global UI fixes
 * Separated from inline styles for better caching and Core Web Vitals
 */

/* Mobile Container & Search Layout */
@media (max-width: 992px) {
    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .navbar .container {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        gap: 10px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .navbar-brand { grid-column: 1; }
    .mobile-menu-btn { grid-column: 2; }

    .navbar-search {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: none !important;
        margin-top: 0 !important;
        box-sizing: border-box !important;
    }

    .search-wrapper {
        width: 100% !important;
        display: block !important;
    }

    .search-input {
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
}

/* Dropdown & Form Styling (White Background) */
.form-group input,
.form-group select,
.input-group input,
.input-group select {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border: 2px solid #e2e8f0 !important;
}

/* Smart Flex for Dropdowns (Prevent Squeezing) */
.input-group select {
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 80px !important;
    max-width: 40% !important;
}

/* Clean Report Button */
.report-issue-btn {
    display: inline-block !important;
    color: #64748b !important;
    background: white !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 0.5rem 1rem !important;
    text-decoration: none !important;
    border-style: solid !important;
}

/* ==========================================
   GDPR Consent Modal Styles
   Google Consent Mode v2 Compliant
   ========================================== */

/* Overlay */
.gdpr-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.gdpr-overlay.show {
    display: flex;
}

/* Modal */
.gdpr-modal {
    background: #ffffff;
    border-radius: 16px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: gdprModalIn 0.3s ease-out;
}

@keyframes gdprModalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Header */
.gdpr-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
}

.gdpr-header h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    color: #1e293b;
}

.gdpr-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

/* Body */
.gdpr-body {
    padding: 1.5rem;
}

.gdpr-body > p {
    margin: 0 0 1.5rem;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Quick Actions (Main View) */
.gdpr-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Buttons */
.gdpr-btn {
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.gdpr-btn-accept {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
}

.gdpr-btn-accept:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.gdpr-btn-reject {
    background: #f1f5f9;
    color: #475569;
    border: 2px solid #e2e8f0;
}

.gdpr-btn-reject:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.gdpr-btn-customize {
    background: transparent;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.gdpr-btn-customize:hover {
    background: #eff6ff;
}

.gdpr-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 2px solid #e2e8f0;
}

.gdpr-btn-secondary:hover {
    background: #e2e8f0;
}

/* Categories (Customize View) */
.gdpr-category {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.gdpr-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    gap: 1rem;
    background: #f8fafc;
}

.gdpr-category-info {
    flex: 1;
}

.gdpr-category-info h4 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    color: #1e293b;
    font-weight: 600;
}

.gdpr-category-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

/* Toggle Switch */
.gdpr-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
}

.gdpr-toggle input {
    display: none;
}

.gdpr-toggle-slider {
    width: 48px;
    height: 26px;
    background: #cbd5e1;
    border-radius: 13px;
    position: relative;
    transition: all 0.3s ease;
}

.gdpr-toggle-slider::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gdpr-toggle input:checked + .gdpr-toggle-slider {
    background: #22c55e;
}

.gdpr-toggle input:checked + .gdpr-toggle-slider::after {
    transform: translateX(22px);
}

.gdpr-toggle input:disabled + .gdpr-toggle-slider {
    background: #22c55e;
    opacity: 0.7;
}

.gdpr-toggle-label {
    font-size: 0.75rem;
    color: #16a34a;
    font-weight: 600;
    white-space: nowrap;
}

/* Actions (Customize View) */
.gdpr-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.gdpr-actions .gdpr-btn {
    flex: 1;
}

/* Footer */
.gdpr-footer {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.gdpr-footer p {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
    line-height: 1.5;
}

.gdpr-footer a {
    color: #3b82f6;
    text-decoration: none;
}

.gdpr-footer a:hover {
    text-decoration: underline;
}

/* Cookie Settings Link in Footer */
.cookie-settings-link {
    cursor: pointer;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .gdpr-modal {
        max-width: 100%;
        margin: 0.5rem;
        border-radius: 12px;
        max-height: 95vh;
    }

    .gdpr-header {
        padding: 1.25rem 1rem 0.75rem;
    }

    .gdpr-header h2 {
        font-size: 1.25rem;
    }

    .gdpr-body {
        padding: 1rem;
    }

    .gdpr-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }

    .gdpr-toggle {
        align-self: flex-end;
    }

    .gdpr-actions {
        flex-direction: column;
    }

    .gdpr-footer {
        padding: 1rem;
    }
}

/* Legacy Cookie Banner (keeping for backwards compatibility) */
.cookie-banner {
    display: none !important;
}

/* ==========================================
   Share Result Feature Styles
   ========================================== */

/* Share Button (in result box) */
.share-result-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.share-result-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.share-result-btn:active {
    transform: translateY(0);
}

/* Share Modal Overlay */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

/* Share Modal */
.share-modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: shareModalIn 0.2s ease-out;
}

@keyframes shareModalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.share-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.share-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1e293b;
}

.share-header .close-btn {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.share-header .close-btn:hover {
    color: #1e293b;
}

.share-body {
    padding: 1.5rem;
}

/* Share Preview */
.share-preview {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.share-preview pre {
    margin: 0;
    font-family: inherit;
    font-size: 0.9rem;
    color: #475569;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Share URL Section */
.share-url-section {
    margin-bottom: 1.25rem;
}

.share-url-section label {
    display: block;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.share-url-row {
    display: flex;
    gap: 0.5rem;
}

.share-url-row input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #475569;
    background: #f8fafc;
}

.btn-copy {
    padding: 0.625rem 1rem;
    background: #1e293b;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: #0f172a;
}

/* Share Buttons Grid */
.share-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.875rem 0.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.share-btn span {
    font-size: 1.25rem;
    line-height: 1;
}

.share-btn:hover {
    transform: translateY(-2px);
}

/* Social Colors */
.share-twitter {
    background: #f0f9ff;
    color: #0ea5e9;
    border-color: #bae6fd;
}
.share-twitter:hover {
    background: #e0f2fe;
}

.share-facebook {
    background: #eff6ff;
    color: #3b82f6;
    border-color: #bfdbfe;
}
.share-facebook:hover {
    background: #dbeafe;
}

.share-linkedin {
    background: #f0f9ff;
    color: #0284c7;
    border-color: #bae6fd;
}
.share-linkedin:hover {
    background: #e0f2fe;
}

.share-whatsapp {
    background: #f0fdf4;
    color: #22c55e;
    border-color: #bbf7d0;
}
.share-whatsapp:hover {
    background: #dcfce7;
}

.share-email {
    background: #fefce8;
    color: #ca8a04;
    border-color: #fef08a;
}
.share-email:hover {
    background: #fef9c3;
}

/* Native Share Button */
.btn-native-share {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-native-share:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-2px);
}

/* Share Status */
.share-status {
    text-align: center;
    margin-top: 1rem;
    padding: 0.5rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    min-height: 1.5rem;
}

.share-status.success {
    background: #f0fdf4;
    color: #16a34a;
}

.share-status.error {
    background: #fef2f2;
    color: #dc2626;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .share-modal {
        max-width: 100%;
        margin: 0.5rem;
        border-radius: 12px;
    }

    .share-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .share-url-row {
        flex-direction: column;
    }

    .btn-copy {
        width: 100%;
    }
}
