/**
 * Cookie Consent Styles — REMECO s.r.o.
 * Centralizovaný CSS pre cookie banner, modal a floating button
 * Verzia: 1.0
 */

/* ============= COOKIE CONSENT BANNER ============= */
.cc-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    color: #fff;
    padding: 1.25rem 1.5rem;
    z-index: 99999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.cc-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cc-text {
    flex: 1;
    min-width: 280px;
}

.cc-text p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cc-text p:last-child {
    margin-bottom: 0;
}

.cc-text a {
    color: #ff6b35;
    text-decoration: underline;
}

.cc-text a:hover {
    color: #fff;
}

.cc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ============= BUTTONS ============= */
.cc-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cc-btn-accept {
    background: linear-gradient(45deg, #ff6b35, #e55a2b);
    color: #fff;
}

.cc-btn-accept:hover {
    background: linear-gradient(45deg, #e55a2b, #c43f26);
    transform: translateY(-2px);
}

.cc-btn-reject {
    background: transparent;
    color: #fff;
    border: 2px solid #666;
}

.cc-btn-reject:hover {
    border-color: #ff6b35;
    color: #ff6b35;
}

.cc-btn-settings {
    background: transparent;
    color: #ccc;
    border: none;
    text-decoration: underline;
    padding: 0.75rem 1rem;
}

.cc-btn-settings:hover {
    color: #fff;
}

.cc-btn-save {
    background: #333;
    color: #fff;
    border: 2px solid #666;
}

.cc-btn-save:hover {
    border-color: #ff6b35;
}

/* ============= MODAL ============= */
.cc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.cc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.cc-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    max-width: 550px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.cc-modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #333;
}

.cc-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.cc-modal-close:hover {
    color: #ff6b35;
}

.cc-modal-body {
    padding: 1.5rem;
}

.cc-modal-body > p {
    margin: 0 0 1.5rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============= COOKIE CATEGORIES ============= */
.cc-category {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.cc-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    gap: 1rem;
}

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

.cc-category-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: #333;
}

.cc-category-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

/* ============= TOGGLE SWITCH ============= */
.cc-toggle {
    flex-shrink: 0;
}

.cc-toggle input {
    display: none;
}

.cc-toggle label {
    display: block;
    width: 50px;
    height: 28px;
    background: #ccc;
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.cc-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cc-toggle input:checked + label {
    background: #ff6b35;
}

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

.cc-toggle-disabled label {
    background: #28a745 !important;
    cursor: not-allowed;
    opacity: 0.8;
}

.cc-toggle-disabled label::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ============= MODAL FOOTER ============= */
.cc-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

/* ============= FLOATING COOKIE BUTTON ============= */
.cc-floating-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e88e5, #1565c0);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.4);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cc-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.5);
}

.cc-floating-btn:active {
    transform: scale(0.95);
}

.cc-floating-btn svg {
    width: 26px;
    height: 26px;
}

/* ============= RESPONSIVE ============= */
@media (max-width: 767px) {
    .cc-banner {
        padding: 1rem;
    }

    .cc-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .cc-text {
        min-width: auto;
    }

    .cc-buttons {
        justify-content: center;
    }

    .cc-btn {
        flex: 1;
        min-width: 120px;
        padding: 0.65rem 1rem;
        font-size: 0.8rem;
    }

    .cc-btn-settings {
        flex: none;
        width: 100%;
    }

    .cc-modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .cc-modal-header,
    .cc-modal-body,
    .cc-modal-footer {
        padding: 1rem;
    }

    .cc-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .cc-modal-footer {
        flex-direction: column;
    }

    .cc-modal-footer .cc-btn {
        width: 100%;
    }

    .cc-floating-btn {
        width: 44px;
        height: 44px;
        bottom: 15px;
        left: 15px;
    }

    .cc-floating-btn svg {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 479px) {
    .cc-text p {
        font-size: 0.85rem;
    }

    .cc-btn {
        font-size: 0.75rem;
        padding: 0.6rem 0.8rem;
    }
}
