/**
 * Cookie Consent Styles
 */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Banner Styles */
.ccc-banner {
    position: fixed;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    padding: 24px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
    z-index: 99998;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    animation: slideUp 0.4s ease-out;
}

.ccc-banner-bottom {
    bottom: 0;
    border-radius: 16px 16px 0 0;
}

.ccc-banner-top {
    top: 32px;
    border-radius: 0 0 16px 16px;
    animation: slideDown 0.4s ease-out;
}

/* Admin bar support for logged-in users */
body.admin-bar .ccc-banner-top {
    top: 46px;
}

@media screen and (min-width: 783px) {
    body.admin-bar .ccc-banner-top {
        top: 32px;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ccc-banner-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.ccc-banner-text {
    flex: 1;
    min-width: 300px;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.ccc-banner-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Button Styles */
.ccc-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    pointer-events: auto;
}

.ccc-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.ccc-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ccc-button:focus-visible {
    outline: 2px solid #c7d2fe;
    outline-offset: 2px;
}

.ccc-button-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.ccc-button-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.ccc-button-tertiary {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ccc-button-tertiary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

/* Modal Styles */
.ccc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

.ccc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    pointer-events: auto;
}

.ccc-modal-content {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalFadeIn 0.3s ease-out;
    pointer-events: auto;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ccc-modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Jawny kolor — motywy często ustawiają h2 na czarny i nadpisują dziedziczenie */
.ccc-modal-content .ccc-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff !important;
    line-height: 1.3;
}

.ccc-modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    pointer-events: auto;
}

.ccc-modal-close:hover {
    color: #ffffff;
}

.ccc-modal-close:focus-visible {
    outline: 2px solid #c7d2fe;
    outline-offset: 2px;
    border-radius: 4px;
}

.ccc-modal[hidden] {
    display: none !important;
}

.ccc-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.ccc-modal-body > p {
    margin-top: 0;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.ccc-modal-footer {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Category Styles */
.ccc-category {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: background 0.3s ease;
}

.ccc-category:hover {
    background: rgba(255, 255, 255, 0.08);
}

.ccc-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.ccc-category-info {
    flex: 1;
}

.ccc-category-info h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.ccc-category-info p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

/* Toggle Switch */
.ccc-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
    flex-shrink: 0;
}

.ccc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ccc-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 28px;
    pointer-events: auto;
}

.ccc-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.ccc-switch input:checked + .ccc-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ccc-switch input:checked + .ccc-slider:before {
    transform: translateX(28px);
}

.ccc-switch-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ccc-switch-disabled .ccc-slider {
    cursor: not-allowed;
}

/* Shortcode Button */
.ccc-settings-button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ccc-settings-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ccc-banner {
        padding: 16px;
    }

    .ccc-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .ccc-banner-text {
        min-width: auto;
        text-align: center;
    }

    .ccc-banner-buttons {
        flex-direction: column;
        width: 100%;
    }

    .ccc-button {
        width: 100%;
        justify-content: center;
    }

    .ccc-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .ccc-modal-header,
    .ccc-modal-body,
    .ccc-modal-footer {
        padding: 16px;
    }

    .ccc-modal-content .ccc-modal-header h2 {
        font-size: 20px;
    }

    .ccc-category {
        padding: 16px;
    }

    .ccc-category-header {
        flex-direction: column;
        gap: 12px;
    }

    .ccc-modal-footer {
        flex-direction: column;
    }

    .ccc-modal-footer .ccc-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ccc-banner {
        padding: 12px;
    }

    .ccc-banner-text {
        font-size: 14px;
    }

    .ccc-button {
        padding: 10px 16px;
        font-size: 13px;
    }

    .ccc-modal-content .ccc-modal-header h2 {
        font-size: 18px;
    }

    .ccc-category-info h3 {
        font-size: 16px;
    }

    .ccc-category-info p {
        font-size: 13px;
    }
}
