/*
 * DV Digital - Cookie Consent System CSS
 * Premium B&W Aesthetic Integrated styling
 */

/* =========================================================================
   1. Cookie Banner (Bottom Left / Bottom Center)
   ========================================================================= */
   .cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: calc(100% - 48px);
    max-width: 420px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 12px 40px var(--shadow-color);
    z-index: 9998;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
  }
  
  .cookie-banner.show {
    transform: translateY(0);
    opacity: 1;
  }
  
  .cookie-banner-header {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .cookie-banner-header svg {
    width: 24px;
    height: 24px;
    fill: var(--text-color);
  }
  
  .cookie-banner-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
  }
  
  .cookie-banner-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
  }
  
  .cookie-banner-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
  }
  
  .cookie-banner-actions-row {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
  }
  
  .cb-accept-large {
    width: 100%;
    padding: 14px 16px !important;
    font-size: 1rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .cb-secondary-btn {
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
    border-color: transparent !important;
    text-decoration: underline;
  }
  
  .cb-secondary-btn:hover {
    border-color: var(--border-color) !important;
    text-decoration: none;
  }
  
  .cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    text-align: center;
    flex: 1;
  }
  
  .cookie-btn-primary {
    background-color: var(--btn-bg);
    color: var(--btn-text);
  }
  
  .cookie-btn-primary:hover {
    background-color: var(--btn-hover-bg);
    transform: translateY(-2px);
  }
  
  .cookie-btn-outline {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
  }
  
  .cookie-btn-outline:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
    transform: translateY(-2px);
  }
  
  .cookie-banner-links {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 4px;
  }
  
  .cookie-link {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
  }
  
  .cookie-link:hover {
    color: var(--text-color);
  }
  
  /* =========================================================================
     2. Cookie Preferences Frame/Modal
     ========================================================================= */
  .cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  
  .cookie-modal-overlay.show {
    opacity: 1;
    visibility: visible;
  }
  
  .cookie-modal {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .cookie-modal-overlay.show .cookie-modal {
    transform: scale(1);
  }
  
  .cookie-modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }
  
  .cookie-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
  }
  
  .cookie-modal-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
  }
  
  .cookie-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
  }
  
  .cookie-modal-close:hover {
    color: var(--text-color);
  }
  
  .cookie-modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  /* Scrollbar for modal */
  .cookie-modal-body::-webkit-scrollbar {
    width: 6px;
  }
  .cookie-modal-body::-webkit-scrollbar-track {
    background: transparent;
  }
  .cookie-modal-body::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 10px;
  }
  
  .cookie-category {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background-color: var(--card-bg);
    overflow: hidden;
    transition: border-color 0.3s ease;
  }
  
  .cookie-category:hover {
    border-color: var(--border-color);
  }
  
  .cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    user-select: none;
  }
  
  .cookie-category-info {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .cookie-category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
  }
  
  .cookie-category.expanded .cookie-category-icon {
    transform: rotate(180deg);
  }
  
  .cookie-category-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
  }
  
  .cookie-category-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  
  /* Toggle Switch Structure */
  .cookie-toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
  }
  
  .cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(128, 128, 128, 0.4);
    transition: .4s;
    border-radius: 24px;
  }
  
  .cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--btn-text);
    transition: .4s;
    border-radius: 50%;
  }
  
  [data-theme="light"] .cookie-slider:before {
    background-color: white; 
  }
  
  .cookie-toggle input:checked + .cookie-slider {
    background-color: var(--text-color);
  }
  
  .cookie-toggle input:focus + .cookie-slider {
    box-shadow: 0 0 1px var(--text-color);
  }
  
  .cookie-toggle input:checked + .cookie-slider:before {
    transform: translateX(20px);
    background-color: var(--bg-color);
  }
  
  /* For Disabled Necessary Toggle */
  .cookie-toggle input:disabled + .cookie-slider {
    cursor: not-allowed;
    opacity: 0.5;
  }
  
  .cookie-category-content {
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
  }
  
  .cookie-category.expanded .cookie-category-content {
    padding: 0 16px 16px;
    max-height: 200px;
  }
  
  .cookie-category-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
  }
  
  .cookie-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: var(--bg-secondary);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
  }
  
  .cookie-modal-footer .cookie-btn {
    flex: none;
    min-width: 140px;
  }
  
  /* =========================================================================
     3. Responsive Rules
     ========================================================================= */
  @media (max-width: 768px) {
    .cookie-banner {
      bottom: 16px;
      left: 16px;
      width: calc(100% - 32px);
      max-width: none;
      padding: 20px;
    }
    
    .cookie-banner-actions-row {
      flex-direction: column;
    }
    
    .cookie-modal {
      max-height: 95vh;
    }
    
    .cookie-modal-header {
      padding: 20px;
    }
    
    .cookie-modal-body {
      padding: 16px;
    }
    
    .cookie-modal-footer {
      flex-direction: column;
      padding: 16px;
    }
    
    .cookie-modal-footer .cookie-btn {
      width: 100%;
    }
  }
