/**
 * Salon Renter Cookie Consent - Banner Styles
 * 
 * @package Salon_Renter_Cookie_Consent
 */

/* CSS Custom Properties */
:root {
    --srcc-primary: #00d9ff;
    --srcc-primary-hover: #00b8d9;
    --srcc-dark: #1a1a2e;
    --srcc-dark-hover: #2a2a4e;
    --srcc-text: #ffffff;
    --srcc-text-muted: #b8b8b8;
    --srcc-border: #333;
    --srcc-shadow: rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Consent Banner
   ========================================================================== */

.srcc-consent-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--srcc-dark);
    color: var(--srcc-text);
    padding: 20px;
    z-index: 999999;
    box-shadow: 0 -4px 20px var(--srcc-shadow);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.srcc-consent-banner.srcc-show {
    display: block;
    animation: srcc-slide-up 0.3s ease-out;
}

@keyframes srcc-slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.srcc-consent-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.srcc-consent-text {
    flex: 1;
    min-width: 300px;
}

.srcc-consent-text h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--srcc-text);
}

.srcc-consent-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--srcc-text-muted);
}

.srcc-consent-text a {
    color: var(--srcc-primary);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.srcc-consent-text a:hover {
    color: var(--srcc-primary-hover);
}

.srcc-consent-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.srcc-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    line-height: 1;
}

.srcc-btn:focus {
    outline: 2px solid var(--srcc-primary);
    outline-offset: 2px;
}

.srcc-btn-accept,
.srcc-btn-primary {
    background: var(--srcc-primary);
    color: var(--srcc-dark);
}

.srcc-btn-accept:hover,
.srcc-btn-primary:hover {
    background: var(--srcc-primary-hover);
}

.srcc-btn-reject {
    background: transparent;
    color: var(--srcc-text);
    border: 2px solid var(--srcc-text);
}

.srcc-btn-reject:hover {
    background: rgba(255, 255, 255, 0.1);
}

.srcc-btn-preferences,
.srcc-btn-secondary {
    background: transparent;
    color: var(--srcc-text-muted);
    border: 1px solid var(--srcc-text-muted);
}

.srcc-btn-preferences:hover,
.srcc-btn-secondary:hover {
    color: var(--srcc-text);
    border-color: var(--srcc-text);
}

/* ==========================================================================
   Preferences Modal
   ========================================================================== */

.srcc-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.srcc-modal.srcc-show {
    display: flex;
    animation: srcc-fade-in 0.2s ease-out;
}

@keyframes srcc-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.srcc-modal-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    color: #333;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: srcc-scale-in 0.2s ease-out;
}

@keyframes srcc-scale-in {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.srcc-modal-header {
    padding: 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.srcc-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
}

.srcc-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.srcc-modal-close:hover {
    color: #333;
}

.srcc-modal-body {
    padding: 24px;
}

.srcc-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ==========================================================================
   Cookie Categories
   ========================================================================== */

.srcc-cookie-category {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.srcc-cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.srcc-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.srcc-category-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
}

.srcc-cookie-category p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* ==========================================================================
   Toggle Switch
   ========================================================================== */

.srcc-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.srcc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.srcc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.srcc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.srcc-toggle input:checked + .srcc-toggle-slider {
    background-color: var(--srcc-primary);
}

.srcc-toggle input:checked + .srcc-toggle-slider:before {
    transform: translateX(24px);
}

.srcc-toggle input:disabled + .srcc-toggle-slider {
    background-color: var(--srcc-primary);
    opacity: 0.6;
    cursor: not-allowed;
}

.srcc-toggle input:focus + .srcc-toggle-slider {
    box-shadow: 0 0 0 2px rgba(0, 217, 255, 0.3);
}

/* ==========================================================================
   Footer Privacy Links (Floating)
   ========================================================================== */

/* Small Floating Cookie Button */
.srcc-floating-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99998;
}

.srcc-fab {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(26, 26, 46, 0.95);
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.srcc-fab:hover {
    background: var(--srcc-primary);
    transform: scale(1.1);
}

.srcc-fab-menu {
    position: absolute;
    bottom: 56px;
    left: 0;
    background: rgba(26, 26, 46, 0.98);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 180px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.srcc-floating-btn.srcc-open .srcc-fab-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.srcc-fab-menu button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #fff;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.srcc-fab-menu button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Legacy styles - kept for compatibility */
.srcc-footer-links {
    display: none;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
    .srcc-consent-banner {
        padding: 12px 16px;
        max-height: 85vh;
        overflow-y: auto;
        bottom: 0;
        /* Ensure it's above any mobile navigation */
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
    
    .srcc-consent-inner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .srcc-consent-text {
        min-width: auto;
    }
    
    .srcc-consent-text h4 {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .srcc-consent-text p {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .srcc-consent-buttons {
        width: 100%;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 8px;
    }
    
    .srcc-btn {
        flex: 1;
        min-width: 80px;
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .srcc-modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .srcc-modal-header {
        padding: 16px;
    }
    
    .srcc-modal-body {
        padding: 16px;
    }
    
    .srcc-modal-footer {
        padding: 16px;
        flex-direction: column;
    }
    
    .srcc-modal-footer .srcc-btn {
        width: 100%;
    }
    
    .srcc-floating-btn {
        bottom: 15px;
        left: 10px;
    }
    
    .srcc-fab {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }
    
    .srcc-fab-menu {
        bottom: 50px;
        min-width: 160px;
    }
    
    .srcc-fab-menu button {
        padding: 10px 14px;
        font-size: 12px;
    }
}

/* Extra small devices */
@media (max-width: 380px) {
    .srcc-consent-banner {
        padding: 10px 12px;
    }
    
    .srcc-consent-text h4 {
        font-size: 14px;
    }
    
    .srcc-consent-text p {
        font-size: 11px;
    }
    
    .srcc-consent-buttons {
        flex-direction: column;
        gap: 6px;
    }
    
    .srcc-btn {
        width: 100%;
        padding: 10px 8px;
        font-size: 12px;
    }
}

/* ==========================================================================
   Print Styles - Hide banner when printing
   ========================================================================== */

@media print {
    .srcc-consent-banner,
    .srcc-modal,
    .srcc-footer-links,
    .srcc-floating-btn {
        display: none !important;
    }
}
