/* Shared component styles for frontend offcanvas and admin preview - /assets/css/cqure-cc-shared.css */
#cqure-preview,
#cqure-cc-offcanvas {
    background: var(--cqure-cc-panel-bg);
    color: var(--cqure-cc-panel-text);
}

/* Header */
#cqure-preview .cqure-cc-header,
#cqure-cc-offcanvas .cqure-cc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--cqure-cc-separator);
    padding: 1rem 1.25rem;
}

#cqure-preview .cqure-cc-header h2,
#cqure-preview .cqure-cc-header h5,
#cqure-cc-offcanvas .cqure-cc-header h2,
#cqure-cc-offcanvas .cqure-cc-header h5,
#cqure-preview #cqure-cc-title,
#cqure-cc-offcanvas #cqure-cc-title {
    margin: 0;
    padding-bottom: 0;
    line-height: 1.2;
    color: var(--cqure-cc-panel-text);
    font-size: 1.75rem;
}

#cqure-cc-offcanvas .cqure-cc-close {
    border: 0;
    background: none;
    cursor: pointer;
    line-height: 1;
    color: var(--cqure-cc-panel-text);
    font-size: 1.75rem;
}

/* Tabs */
#cqure-preview .cqure-cc-tabs,
#cqure-cc-offcanvas .cqure-cc-tabs {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--cqure-cc-separator);
    padding: 0.75rem 1.25rem;
    gap: 0.5rem;
}

#cqure-preview .cqure-cc-tab,
#cqure-cc-offcanvas .cqure-cc-tab {
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    cursor: pointer;
    padding: 0.5rem 0.625rem;
    line-height: 1.2;
    color: var(--cqure-cc-tab-text);
    font: inherit;
}

#cqure-preview .cqure-cc-tab.is-active,
#cqure-cc-offcanvas .cqure-cc-tab.is-active {
    border-color: var(--cqure-cc-tab-active);
}

#cqure-preview .cqure-cc-privacy,
#cqure-cc-offcanvas .cqure-cc-privacy {
    margin-left: auto;
    text-decoration: none;
    color: var(--cqure-cc-link-color);
    font-size: 0.875rem;
}

/* Intro */
#cqure-preview .cqure-cc-intro-text,
#cqure-cc-offcanvas .cqure-cc-intro-text {
    border-bottom: 1px solid var(--cqure-cc-separator);
    background: var(--cqure-cc-intro-bg);
    padding: 1rem 1.25rem;
}

#cqure-preview .cqure-cc-intro-text p,
#cqure-cc-offcanvas .cqure-cc-intro-text p {
    margin: 0;
    line-height: 1.7;
    color: var(--cqure-cc-intro-text);
    font-size: 0.875rem;
}

#cqure-preview .cqure-cc-intro-text a,
#cqure-cc-offcanvas .cqure-cc-intro-text a {
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
    text-decoration: none;
    color: var(--cqure-cc-link-color);
    font-weight: 500;
}

#cqure-preview .cqure-cc-intro-text a:hover,
#cqure-cc-offcanvas .cqure-cc-intro-text a:hover {
    border-bottom-color: var(--cqure-cc-link-hover);
    color: var(--cqure-cc-link-hover);
}

/* Panels */
#cqure-preview .cqure-cc-panels,
#cqure-cc-offcanvas .cqure-cc-panels {
    padding: 1rem 1.25rem;
}

#cqure-preview .cqure-cc-panel[hidden],
#cqure-cc-offcanvas .cqure-cc-panel[hidden] {
    display: none;
}

/* Generic items */
#cqure-preview .cqure-cc-item,
#cqure-cc-offcanvas .cqure-cc-item {
    margin-bottom: 0.75rem;
    border: 1px solid var(--cqure-cc-item-border);
    border-radius: 10px;
    background: var(--cqure-cc-item-bg);
    padding: 0.75rem 0.875rem;
}

#cqure-preview .cqure-cc-item.is-locked,
#cqure-cc-offcanvas .cqure-cc-item.is-locked {
    opacity: .9;
}

#cqure-preview .cqure-cc-item.is-empty,
#cqure-cc-offcanvas .cqure-cc-item.is-empty {
    opacity: .7;
}

#cqure-preview .cqure-cc-item.is-empty .cqure-cc-item-head strong,
#cqure-cc-offcanvas .cqure-cc-item.is-empty .cqure-cc-item-head strong {
    opacity: .6;
}

#cqure-preview .cqure-cc-description--empty,
#cqure-cc-offcanvas .cqure-cc-description--empty {
    opacity: .7;
    font-style: italic;
}

#cqure-preview .cqure-cc-item-head,
#cqure-cc-offcanvas .cqure-cc-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.375rem;
}

#cqure-preview .cqure-cc-item-head strong,
#cqure-cc-offcanvas .cqure-cc-item-head strong {
    color: var(--cqure-cc-title-color);
}

/* Review notice */
#cqure-preview .cqure-cc-review-notice,
#cqure-cc-offcanvas .cqure-cc-review-notice {
    margin-bottom: 0.75rem;
    border-left: 3px solid #0073aa;
    border-radius: 0.5rem;
    background: rgba(0, 115, 170, 0.08);
    padding: 0.625rem 0.875rem;
}

#cqure-preview .cqure-cc-review-notice p,
#cqure-cc-offcanvas .cqure-cc-review-notice p {
    opacity: .9;
    margin: 0;
    color: var(--cqure-cc-panel-text);
    font-size: .85em;
}

/* Services */
#cqure-preview .cqure-cc-service,
#cqure-cc-offcanvas .cqure-cc-service {
    margin-bottom: 0.75rem;
    border: 1px solid var(--cqure-cc-item-border);
    border-radius: 0.625rem;
    background: var(--cqure-cc-item-bg);
    padding: 0.75rem 0.875rem;
}

#cqure-preview .cqure-cc-service:last-child,
#cqure-cc-offcanvas .cqure-cc-service:last-child {
    margin-bottom: 0;
}

#cqure-preview .cqure-cc-service-head,
#cqure-cc-offcanvas .cqure-cc-service-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.375rem;
    gap: 0.5rem;
}

#cqure-preview .cqure-cc-service-head strong,
#cqure-cc-offcanvas .cqure-cc-service-head strong {
    flex: 1;
    min-width: 0;
    color: var(--cqure-cc-title-color);
}

#cqure-preview .cqure-cc-badge,
#cqure-cc-offcanvas .cqure-cc-badge {
    border-radius: 999px;
    background: #eef7dd;
    padding: 0 1rem;
    line-height: 1.5rem;
    color: #223;
    font-size: 0.75rem;
}

#cqure-preview .cqure-cc-description,
#cqure-cc-offcanvas .cqure-cc-description {
    margin: 0 0 0.375rem;
    padding-bottom: 0;
    line-height: 1.6;
    color: var(--cqure-cc-description-color);
    font-size: 0.9375rem;
}

#cqure-preview .cqure-cc-meta,
#cqure-cc-offcanvas .cqure-cc-meta {
    margin: 0;
    line-height: 1.5;
    color: var(--cqure-cc-meta-color);
    font-size: 0.75rem;
    font-weight: normal;
}

#cqure-preview .cqure-cc-empty,
#cqure-cc-offcanvas .cqure-cc-empty {
    color: #777;
}

/* Toggle */
#cqure-preview .cqure-cc-switch,
#cqure-cc-offcanvas .cqure-cc-switch {
    display: inline-block;
    position: relative;
    width: 3.75rem;
    height: 1.75rem;
}

#cqure-preview .cqure-cc-switch input,
#cqure-cc-offcanvas .cqure-cc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

#cqure-preview .cqure-cc-slider,
#cqure-cc-offcanvas .cqure-cc-slider {
    display: flex;
    position: absolute;
    align-items: center;
    transition: all .3s ease;
    border-radius: 1rem;
    background: var(--cqure-cc-toggle-off);
    cursor: pointer;
    overflow: hidden;
    inset: 0;
}

#cqure-preview .cqure-cc-slider:before,
#cqure-cc-offcanvas .cqure-cc-slider:before {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    z-index: 1;
    color: var(--cqure-cc-toggle-text);
    font-size: 0.5625rem;
    font-weight: 600;
    content: "OFF";
}

#cqure-preview .cqure-cc-slider:after,
#cqure-cc-offcanvas .cqure-cc-slider:after {
    position: absolute;
    top: 0.1875rem;
    left: 0.1875rem;
    transition: all .3s ease;
    z-index: 2;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
    background: var(--cqure-cc-toggle-circle);
    content: "";
}

#cqure-preview .cqure-cc-switch input:checked + .cqure-cc-slider,
#cqure-cc-offcanvas .cqure-cc-switch input:checked + .cqure-cc-slider {
    background: var(--cqure-cc-toggle-on);
}

#cqure-preview .cqure-cc-switch input:checked + .cqure-cc-slider:after,
#cqure-cc-offcanvas .cqure-cc-switch input:checked + .cqure-cc-slider:after {
    transform: translateX(2rem);
}

#cqure-preview .cqure-cc-switch input:checked + .cqure-cc-slider:before,
#cqure-cc-offcanvas .cqure-cc-switch input:checked + .cqure-cc-slider:before {
    right: auto;
    left: 0.5rem;
    color: var(--cqure-cc-toggle-circle);
    content: "ON";
}

/* Message */
#cqure-preview #cqure-cc-message,
#cqure-cc-offcanvas #cqure-cc-message,
#cqure-preview .cqure-cc-message,
#cqure-cc-offcanvas .cqure-cc-message {
    transform: translateY(-100%);
    transition: all 0.3s ease;
    visibility: hidden;
    opacity: 0;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    padding: 0.75rem 1.25rem;
    text-align: center;
}

#cqure-preview #cqure-cc-message:not([hidden]),
#cqure-cc-offcanvas #cqure-cc-message:not([hidden]),
#cqure-preview .cqure-cc-message:not([hidden]),
#cqure-cc-offcanvas .cqure-cc-message:not([hidden]) {
    visibility: visible;
}

#cqure-preview #cqure-cc-message.is-visible,
#cqure-cc-offcanvas #cqure-cc-message.is-visible,
#cqure-preview .cqure-cc-message.is-visible,
#cqure-cc-offcanvas .cqure-cc-message.is-visible {
    transform: translateY(0);
    opacity: 1;
}

#cqure-preview .cqure-cc-message-text,
#cqure-cc-offcanvas .cqure-cc-message-text {
    color: #333;
    font-size: 0.875rem;
    font-weight: 500;
}

#cqure-preview #cqure-cc-message.success,
#cqure-cc-offcanvas #cqure-cc-message.success,
#cqure-preview .cqure-cc-message.success,
#cqure-cc-offcanvas .cqure-cc-message.success {
    border-color: #c3e6cb;
    background: #d4edda;
}

#cqure-preview #cqure-cc-message.success .cqure-cc-message-text,
#cqure-cc-offcanvas #cqure-cc-message.success .cqure-cc-message-text,
#cqure-preview .cqure-cc-message.success .cqure-cc-message-text,
#cqure-cc-offcanvas .cqure-cc-message.success .cqure-cc-message-text,
#cqure-preview .cqure-cc-message.success .cqure-cc-message-text,
#cqure-cc-offcanvas .cqure-cc-message.success .cqure-cc-message-text {
    color: #155724;
}

/* Footer / buttons */
#cqure-preview .cqure-cc-footer,
#cqure-cc-offcanvas .cqure-cc-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    border-top: 1px solid var(--cqure-cc-separator);
    padding: 1rem 1.25rem;
    gap: 0.5rem;
}


#cqure-preview .cqure-cc-btn,
#cqure-cc-offcanvas .cqure-cc-btn,
#cqure-cc-bottom-banner .cqure-cc-btn {
    transition: opacity 0.2s;
    border: 0;
    border-radius: var(--cqure-cc-button-radius);
    background: none;
    cursor: pointer;
    padding: 0.625rem 0.875rem;
    text-decoration: none;
    line-height: 1.2;
    color: inherit;
    font-weight: 500;
}

#cqure-preview .cqure-cc-btn:hover,
#cqure-cc-offcanvas .cqure-cc-btn:hover,
#cqure-cc-bottom-banner .cqure-cc-btn:hover {
    opacity: 0.9;
}

#cqure-preview .cqure-cc-btn-save,
#cqure-cc-offcanvas .cqure-cc-btn-save,
#cqure-cc-bottom-banner .cqure-cc-btn-save {
    background: var(--cqure-cc-button-save-bg);
    color: var(--cqure-cc-button-save-text);
}

#cqure-preview .cqure-cc-btn-deny,
#cqure-cc-offcanvas .cqure-cc-btn-deny,
#cqure-cc-bottom-banner .cqure-cc-btn-deny {
    background: var(--cqure-cc-button-deny-bg);
    color: var(--cqure-cc-button-deny-text);
}

#cqure-preview .cqure-cc-btn-customize,
#cqure-cc-offcanvas .cqure-cc-btn-customize,
#cqure-cc-bottom-banner .cqure-cc-btn-customize {
    background: var(--cqure-cc-button-customize-bg);
    color: var(--cqure-cc-button-customize-text);
}

#cqure-preview .cqure-cc-btn-accept,
#cqure-cc-offcanvas .cqure-cc-btn-accept,
#cqure-cc-bottom-banner .cqure-cc-btn-accept {
    background: var(--cqure-cc-button-accept-bg);
    color: var(--cqure-cc-button-accept-text);
}

#cqure-preview .cqure-cc-btn-essential,
#cqure-cc-offcanvas .cqure-cc-btn-essential,
#cqure-cc-bottom-banner .cqure-cc-btn-essential {
    background: var(--cqure-cc-button-essential-bg);
    color: var(--cqure-cc-button-essential-text);
}
