/* Cookie Consent Manager - Frontend Styles */

/* Cookie Notice Styles */
#ccm-cookie-notice {
    position: fixed;
    z-index: 999999;
    width: 100%;
    left: 0;
    background-color: var(--ccm-bg-color, #1e1e1e);
    color: var(--ccm-text-color, #ffffff);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

#ccm-cookie-notice.ccm-position-bottom {
    bottom: 0;
}

#ccm-cookie-notice.ccm-position-top {
    top: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ccm-notice-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Bar Style */
#ccm-cookie-notice.ccm-bar .ccm-notice-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

#ccm-cookie-notice.ccm-bar .ccm-notice-message {
    flex: 1 1 auto;
    min-width: 300px;
}

#ccm-cookie-notice.ccm-bar .ccm-notice-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Box Style */
#ccm-cookie-notice.ccm-box {
    width: auto;
    max-width: 500px;
    border-radius: 8px;
    margin: 20px;
}

#ccm-cookie-notice.ccm-box.ccm-position-bottom {
    bottom: 20px;
    right: 20px;
    left: auto;
}

#ccm-cookie-notice.ccm-box.ccm-position-top {
    top: 20px;
    right: 20px;
    left: auto;
}

#ccm-cookie-notice.ccm-box .ccm-notice-content {
    display: block;
}

#ccm-cookie-notice.ccm-box .ccm-notice-message {
    margin-bottom: 15px;
}

#ccm-cookie-notice.ccm-box .ccm-notice-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Modal Style */
#ccm-cookie-notice.ccm-modal {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    max-width: 600px;
    border-radius: 8px;
    margin: 0;
}

#ccm-cookie-notice.ccm-modal .ccm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

#ccm-cookie-notice.ccm-modal .ccm-notice-content {
    display: block;
}

#ccm-cookie-notice.ccm-modal .ccm-notice-message {
    margin-bottom: 20px;
}

#ccm-cookie-notice.ccm-modal .ccm-notice-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Message Styles */
.ccm-notice-message {
    margin: 0;
}

.ccm-notice-message p {
    margin: 0 0 10px;
}

.ccm-notice-message p:last-child {
    margin-bottom: 0;
}

.ccm-privacy-link {
    color: var(--ccm-primary-color, #2271b1);
    text-decoration: underline;
    font-weight: 500;
}

.ccm-privacy-link:hover {
    text-decoration: none;
}

.ccm-privacy-policy {
    margin-top: 10px;
}

/* Button Styles */
.ccm-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ccm-btn:focus {
    outline: 2px solid var(--ccm-primary-color, #2271b1);
    outline-offset: 2px;
}

/* .ccm-btn-accept {
    background-color: var(--ccm-primary-color, #2271b1);
    color: #ffffff;
    border-color: var(--ccm-primary-color, #2271b1);
} */

.ccm-btn-accept:hover {
    color:#ffffff !important;
}

.ccm-btn-settings {
    background-color: transparent;
    color: var(--ccm-text-color, #ffffff);
    border-color: var(--ccm-text-color, #ffffff);
}

/* .ccm-btn-settings:hover {
    background-color: rgba(255, 255, 255, 0.1);
} */

.ccm-btn-reject {
    background-color: transparent;
    color: var(--ccm-text-color, #ffffff);
    border-color: var(--ccm-text-color, #ffffff);
}

.ccm-btn-reject:hover {
    color:#ffffff !important;
}

/* Settings Modal */
.ccm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ccm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

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

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

.ccm-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e1e1e;
}

.ccm-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.ccm-modal-close:hover {
    background-color: #f0f0f0;
}

.ccm-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1 1 auto;
    color: #333;
}

.ccm-modal-body > p {
    margin: 0 0 20px;
    color: #666;
}

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

.ccm-modal-footer .ccm-btn {
    color: #1e1e1e;
}

.ccm-btn-primary {
    background-color: var(--ccm-primary-color, #2271b1);
    color: #ffffff !important;
    border-color: var(--ccm-primary-color, #2271b1);
}

.ccm-btn-primary:hover {
    background-color: #1a5a8a;
    border-color: #1a5a8a;
}

/* Cookie Categories */
.ccm-cookie-category {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.ccm-category-header {
    padding: 15px;
    background-color: #f8f8f8;
}

.ccm-category-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.ccm-category-toggle input[type="checkbox"] {
    margin: 0 10px 0 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ccm-category-toggle input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.ccm-category-name {
    font-weight: 600;
    color: #1e1e1e;
    flex: 1;
}

.ccm-category-required {
    font-size: 12px;
    color: #666;
    font-weight: normal;
    margin-left: 8px;
}

.ccm-category-description {
    padding: 15px;
    background-color: #ffffff;
}

.ccm-category-description p {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    #ccm-cookie-notice.ccm-bar .ccm-notice-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #ccm-cookie-notice.ccm-bar .ccm-notice-actions {
        width: 100%;
    }
    
    #ccm-cookie-notice.ccm-bar .ccm-btn {
        flex: 1;
    }
    
    #ccm-cookie-notice.ccm-box {
        max-width: calc(100% - 40px);
        left: 20px !important;
        right: 20px !important;
    }
    
    #ccm-cookie-notice.ccm-modal {
        width: calc(100% - 40px);
        max-width: none;
    }
    
    .ccm-modal-content {
        max-height: 95vh;
    }
    
    .ccm-modal-footer {
        flex-direction: column;
    }
    
    .ccm-modal-footer .ccm-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ccm-notice-container {
        padding: 15px;
    }
    
    #ccm-cookie-notice {
        font-size: 13px;
    }
    
    .ccm-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Animation */
@keyframes ccmSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes ccmSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes ccmFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#ccm-cookie-notice.ccm-position-bottom.ccm-bar,
#ccm-cookie-notice.ccm-position-bottom.ccm-box {
    animation: ccmSlideUp 0.3s ease-out;
}

#ccm-cookie-notice.ccm-position-top.ccm-bar,
#ccm-cookie-notice.ccm-position-top.ccm-box {
    animation: ccmSlideDown 0.3s ease-out;
}

#ccm-cookie-notice.ccm-modal,
.ccm-modal {
    animation: ccmFadeIn 0.3s ease-out;
}
