/* public/assets/css/public-style.css */

/* --- Pop-up Container --- */
.tpcs-cookie-popup-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f2f2f2;
    border-top: 1px solid #ccc;
    padding: 15px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-family: Arial, sans-serif;
    color: #333;
}

.tpcs-cookie-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

.tpcs-cookie-content p {
    margin: 0 20px 0 0;
    flex-grow: 1;
}

.tpcs-cookie-content a {
    color: #0073aa;
    text-decoration: none;
}

.tpcs-cookie-buttons {
    display: flex;
    gap: 10px;
}

.tpcs-button {
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.tpcs-button-accept {
    background-color: #0073aa;
    color: #fff;
}

.tpcs-button-accept:hover {
    background-color: #005177;
}

.tpcs-button-settings {
    background-color: #e5e5e5;
    color: #333;
}

.tpcs-button-settings:hover {
    background-color: #d4d4d4;
}

/* --- Modal Container --- */
.tpcs-modal-container {
    display: none; /* เริ่มต้นซ่อน Modal */
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.tpcs-modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-family: Arial, sans-serif;
}

.tpcs-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.tpcs-modal-header h3 {
    margin: 0;
}

.tpcs-modal-close-button {
    font-size: 24px;
    cursor: pointer;
    border: none;
    background: none;
}

.tpcs-modal-body .tpcs-cookie-modal-intro {
    margin-bottom: 20px;
}

.tpcs-cookie-category {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

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

.tpcs-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.tpcs-category-header h4 {
    margin: 0;
}

.tpcs-category-description {
    margin-top: 10px;
    font-size: 12px;
    color: #777;
}

/* Switch Toggle */
.tpcs-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.tpcs-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.tpcs-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.tpcs-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .tpcs-slider {
    background-color: #0073aa;
}

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

.tpcs-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* --- Theme Styles --- */

/* Dark Theme */
.tpcs-theme-dark.tpcs-cookie-popup-container {
    background-color: #333;
    color: #fff;
    border-top: 1px solid #555;
}

.tpcs-theme-dark .tpcs-cookie-content p {
    color: #fff;
}

.tpcs-theme-dark .tpcs-cookie-content a {
    color: #fff;
    text-decoration: underline;
}

.tpcs-theme-dark .tpcs-button-settings {
    background-color: #555;
    color: #fff;
}

.tpcs-theme-dark .tpcs-button-settings:hover {
    background-color: #777;
}

/* Floating Button Theme */
.tpcs-theme-floating.tpcs-cookie-popup-container {
    width: auto;
    right: 20px;
    bottom: 20px;
    left: auto;
    border-radius: 50px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.tpcs-theme-floating .tpcs-cookie-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tpcs-theme-floating .tpcs-cookie-content p {
    display: none; /* ซ่อนข้อความหลัก */
}

.tpcs-theme-floating .tpcs-cookie-buttons {
    flex-direction: column;
    gap: 5px;
}

/* Compact Theme */
.tpcs-theme-compact.tpcs-cookie-popup-container {
    padding: 8px 15px;
    justify-content: flex-start;
}

.tpcs-theme-compact .tpcs-cookie-content {
    flex-wrap: nowrap;
    gap: 15px;
}

.tpcs-theme-compact .tpcs-cookie-content p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}