/* Cookie Consent Banner - Vanilla CSS */

.cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    display: none;
}

.cc-overlay.cc-active {
    display: block;
}

/* Banner */
.cc-banner {
    position: fixed;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    display: none;
    max-width: 100%;
}

.cc-banner.cc-active {
    display: block;
}

.cc-banner *,
.cc-banner *::before,
.cc-banner *::after {
    box-sizing: border-box;
}

/* Positions */
.cc-banner.cc-bottom-left {
    bottom: 20px;
    left: 20px;
    max-width: 420px;
}

.cc-banner.cc-bottom-right {
    bottom: 20px;
    right: 20px;
    max-width: 420px;
}

.cc-banner.cc-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 540px;
    width: 90%;
}

/* Banner inner */
.cc-banner-inner {
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.cc-banner-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.cc-banner-description {
    margin: 0 0 16px 0;
    opacity: 0.9;
    font-size: 14px;
}

.cc-banner-policy {
    margin: 0 0 16px 0;
}

.cc-banner-link {
    text-decoration: underline;
    font-size: 14px;
}

.cc-banner-link:hover {
    opacity: 0.8;
}

/* Buttons */
.cc-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cc-btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    transition: opacity 0.2s, background-color 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.cc-btn:hover {
    opacity: 0.9;
}

.cc-btn-accept {
    flex: 1;
    min-width: 120px;
}

.cc-btn-reject {
    flex: 1;
    min-width: 120px;
}

.cc-btn-preferences {
    width: 100%;
}

/* Preference Centre */
.cc-pref-centre {
    position: fixed;
    z-index: 100000;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 560px;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.cc-pref-centre.cc-active {
    display: flex;
}

.cc-pref-centre *,
.cc-pref-centre *::before,
.cc-pref-centre *::after {
    box-sizing: border-box;
}

.cc-pref-header {
    padding: 24px 24px 16px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cc-pref-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.cc-pref-description {
    margin: 0 0 16px 0;
    padding-top: 16px;
    opacity: 0.7;
    font-size: 14px;
}

.cc-pref-body {
    padding: 0 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.cc-pref-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 8px;
}

/* Category items */
.cc-category {
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cc-category:last-child {
    border-bottom: none;
}

.cc-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.cc-category-info {
    flex: 1;
}

.cc-category-name {
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cc-category-arrow {
    display: inline-block;
    width: 12px;
    height: 12px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.cc-category-arrow svg { width: 100%; height: 100%; }

.cc-category.cc-expanded .cc-category-arrow {
    transform: rotate(90deg);
}

.cc-category-description {
    margin: 4px 0 0;
    font-size: 13px;
    opacity: 0.7;
}

.cc-category-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

/* Cookie list within category */
.cc-cookie-list {
    display: none;
    margin-top: 12px;
    padding: 0;
    list-style: none;
}

.cc-category.cc-expanded .cc-cookie-list {
    display: block;
}

.cc-cookie-item {
    padding: 8px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 13px;
}

.cc-cookie-item:first-child {
    border-top: none;
}

.cc-cookie-name {
    font-weight: 600;
    font-size: 13px;
}

.cc-cookie-meta {
    display: flex;
    gap: 16px;
    margin-top: 2px;
    opacity: 0.6;
    font-size: 12px;
}

.cc-cookie-desc {
    margin-top: 4px;
    opacity: 0.7;
    font-size: 12px;
}

/* Toggle switch */
.cc-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cc-toggle-slider {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cc-toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.cc-toggle input:checked + .cc-toggle-slider::before {
    transform: translateX(20px);
}

.cc-toggle input:disabled + .cc-toggle-slider {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Close button */
.cc-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.6;
    padding: 4px 8px;
    line-height: 1;
}

.cc-close-btn:hover {
    opacity: 1;
}

/* Floating consent button */
.cc-floating-btn {
    position: fixed;
    z-index: 99997;
    bottom: 20px;
    display: flex;
    align-items: center;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    padding: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: padding 0.3s, border-radius 0.3s;
    overflow: hidden;
    max-width: 48px;
    transition: max-width 0.3s ease;
}

.cc-floating-btn.cc-float-left {
    left: 20px;
}

.cc-floating-btn.cc-float-right {
    right: 20px;
}

.cc-floating-btn svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.cc-floating-btn-text {
    white-space: nowrap;
    margin-left: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    opacity: 0;
    transition: opacity 0.2s ease 0.1s;
}

.cc-floating-btn:hover {
    max-width: 300px;
    padding: 10px 16px 10px 10px;
}

.cc-floating-btn:hover .cc-floating-btn-text {
    opacity: 1;
}
