/**
 * TourSure PDPA Consent Styles
 * Version: 1.0.0
 */

/* Reset */
.toursure-pdpa-banner *,
.toursure-pdpa-modal *,
.toursure-pdpa-settings-btn * {
    box-sizing: border-box;
}

/* ===== PDPA Banner ===== */
.toursure-pdpa-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a2e;
    color: #ffffff;
    padding: 20px;
    z-index: 999999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.toursure-pdpa-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.toursure-pdpa-banner-text {
    flex: 1;
    min-width: 300px;
}

.toursure-pdpa-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #ffffff;
}

.toursure-pdpa-description {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    color: #b8b8b8;
}

.toursure-pdpa-link {
    color: #4dabf7;
    text-decoration: underline;
}

.toursure-pdpa-link:hover {
    color: #74c0fc;
}

.toursure-pdpa-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* ===== Buttons ===== */
.toursure-pdpa-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.toursure-pdpa-btn-customize {
    background: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
}

.toursure-pdpa-btn-customize:hover {
    background: rgba(255, 255, 255, 0.1);
}

.toursure-pdpa-btn-accept {
    background: #4dabf7;
    color: #ffffff;
}

.toursure-pdpa-btn-accept:hover {
    background: #339af0;
}

.toursure-pdpa-btn-primary {
    background: #4dabf7;
    color: #ffffff;
}

.toursure-pdpa-btn-primary:hover {
    background: #339af0;
}

.toursure-pdpa-btn-secondary {
    background: transparent;
    color: #666;
    border: 1px solid #ccc;
}

.toursure-pdpa-btn-secondary:hover {
    background: #f5f5f5;
}

/* ===== Settings Button (Floating) ===== */
.toursure-pdpa-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: #1a1a2e;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.toursure-pdpa-settings-btn:hover {
    background: #2a2a4e;
    transform: scale(1.1);
}

.toursure-pdpa-settings-icon {
    width: 24px;
    height: 24px;
}

/* ===== Modal ===== */
.toursure-pdpa-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.toursure-pdpa-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.toursure-pdpa-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
}

.toursure-pdpa-modal-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #1a1a2e;
}

.toursure-pdpa-modal-close {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.toursure-pdpa-modal-close:hover {
    background: #f1f3f4;
}

.toursure-pdpa-modal-close svg {
    width: 20px;
    height: 20px;
    color: #666;
}

.toursure-pdpa-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.toursure-pdpa-modal-intro {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 24px 0;
}

/* ===== Category List ===== */
.toursure-pdpa-category-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.toursure-pdpa-category {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
}

.toursure-pdpa-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.toursure-pdpa-category-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toursure-pdpa-category-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: #1a1a2e;
}

.toursure-pdpa-category-badge {
    font-size: 11px;
    font-weight: 500;
    background: #e9ecef;
    color: #666;
    padding: 2px 8px;
    border-radius: 4px;
}

.toursure-pdpa-category-description {
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    margin: 0;
}

/* ===== Toggle Switch ===== */
.toursure-pdpa-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.toursure-pdpa-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toursure-pdpa-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.toursure-pdpa-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toursure-pdpa-toggle input:checked + .toursure-pdpa-toggle-slider {
    background-color: #4dabf7;
}

.toursure-pdpa-toggle input:checked + .toursure-pdpa-toggle-slider:before {
    transform: translateX(22px);
}

.toursure-pdpa-toggle-disabled .toursure-pdpa-toggle-slider {
    cursor: not-allowed;
    opacity: 0.7;
}

/* ===== Modal Footer ===== */
.toursure-pdpa-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    flex-wrap: wrap;
    gap: 12px;
}

.toursure-pdpa-privacy-link {
    font-size: 14px;
    color: #4dabf7;
    text-decoration: none;
}

.toursure-pdpa-privacy-link:hover {
    text-decoration: underline;
}

.toursure-pdpa-modal-actions {
    display: flex;
    gap: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .toursure-pdpa-settings-btn {
        display: none;
    }

    .toursure-pdpa-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .toursure-pdpa-banner-text {
        min-width: auto;
    }

    .toursure-pdpa-banner-actions {
        width: 100%;
        justify-content: center;
    }

    .toursure-pdpa-modal {
        padding: 10px;
    }

    .toursure-pdpa-modal-content {
        max-height: 95vh;
    }

    .toursure-pdpa-modal-footer {
        flex-direction: column;
        text-align: center;
    }

    .toursure-pdpa-modal-actions {
        width: 100%;
        justify-content: center;
    }

    .toursure-pdpa-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .toursure-pdpa-banner {
        padding: 15px;
    }

    .toursure-pdpa-title {
        font-size: 16px;
    }

    .toursure-pdpa-description {
        font-size: 13px;
    }

    .toursure-pdpa-banner-actions {
        flex-direction: column;
    }

    .toursure-pdpa-btn {
        width: 100%;
    }

    .toursure-pdpa-settings-btn {
        width: 44px;
        height: 44px;
        bottom: 15px;
        left: 15px;
    }

    .toursure-pdpa-settings-icon {
        width: 20px;
        height: 20px;
    }
}
