/**
 * Cookie Consent Styles
 * GDPR-compliant cookie consent banner
 * Scoped to prevent interference with page layout
 */

/* Cookie Settings Modal */
.ezchurch-cookie-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: 1000000 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
}

.ezchurch-cookie-modal[style*="display: block"],
.ezchurch-cookie-modal[style*="display: flex"] {
    display: flex !important;
}

.ezchurch-cookie-modal-content {
    position: relative !important;
    background: #fff !important;
    border-radius: 12px !important;
    max-width: 500px !important;
    width: 90% !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

/* Base Banner Styles */
.ezchurch-cookie-banner {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    background: #ffffff !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15) !important;
    z-index: 999999 !important;
    padding: 25px 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
}

/* Bottom Position (Pushes Content) */
.ezchurch-cookie-bottom {
    position: relative !important;
}

/* Bottom Overlay Position */
.ezchurch-cookie-bottom-overlay {
    bottom: 0 !important;
}

/* Top Position (Pushes Content) */
.ezchurch-cookie-top {
    position: relative !important;
    top: 0 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
}

/* Modal Position (Center Overlay) - for banner positioned as modal */
.ezchurch-cookie-banner.ezchurch-cookie-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    max-width: 600px !important;
    width: 90% !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3) !important;
}

.ezchurch-cookie-banner.ezchurch-cookie-modal::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: -1;
}

/* Animations removed to prevent page interference */

/* Style Variants */
/* Light Style (Default) */
.ezchurch-cookie-light {
    background: #ffffff;
    color: #333;
}

.ezchurch-cookie-light .ezchurch-cookie-icon .dashicons {
    color: #2c5f2d;
}

.ezchurch-cookie-light h4 {
    color: #1a3a1b;
}

.ezchurch-cookie-light p {
    color: #666;
}

/* Dark Style */
.ezchurch-cookie-dark {
    background: #1a1a1a;
    color: #fff;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}

.ezchurch-cookie-dark .ezchurch-cookie-icon .dashicons {
    color: #d4af37;
}

.ezchurch-cookie-dark h4 {
    color: #fff;
}

.ezchurch-cookie-dark p {
    color: #ccc;
}

.ezchurch-cookie-dark .ezchurch-privacy-link {
    color: #d4af37;
}

.ezchurch-cookie-dark .ezchurch-btn-secondary {
    background: #333;
    color: #fff;
    border-color: #555;
}

.ezchurch-cookie-dark .ezchurch-btn-secondary:hover {
    background: #444;
}

/* Green Theme Style */
.ezchurch-cookie-green {
    background: #2c5f2d;
    color: #fff;
}

.ezchurch-cookie-green .ezchurch-cookie-icon .dashicons {
    color: #d4af37;
}

.ezchurch-cookie-green h4 {
    color: #fff;
}

.ezchurch-cookie-green p {
    color: rgba(255,255,255,0.9);
}

.ezchurch-cookie-green .ezchurch-privacy-link {
    color: #d4af37;
}

.ezchurch-cookie-green .ezchurch-privacy-link:hover {
    color: #fff;
}

.ezchurch-cookie-green .ezchurch-btn-secondary {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}

.ezchurch-cookie-green .ezchurch-btn-secondary:hover {
    background: rgba(255,255,255,0.3);
}

.ezchurch-cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.ezchurch-cookie-icon {
    flex-shrink: 0;
}

.ezchurch-cookie-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #2c5f2d;
}

.ezchurch-cookie-text {
    flex: 1;
    min-width: 300px;
}

.ezchurch-cookie-text h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a3a1b;
}

.ezchurch-cookie-text p {
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.ezchurch-privacy-link {
    font-size: 13px;
    color: #2c5f2d;
    text-decoration: underline;
}

.ezchurch-privacy-link:hover {
    color: #1a3a1b;
}

.ezchurch-cookie-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ezchurch-btn-primary,
.ezchurch-btn-secondary {
    padding: 12px 24px !important;
    border-radius: 6px !important;
    border: none !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.ezchurch-btn-primary {
    background: #d4af37 !important;
    color: #1a3a1b !important;
}

.ezchurch-btn-primary:hover {
    background: #c49b2e !important;
}

.ezchurch-btn-secondary {
    background: #2c5f2d !important;
    color: #fff !important;
    border: 1px solid #2c5f2d !important;
}

.ezchurch-btn-secondary:hover {
    background: #1a3a1b !important;
}

/* Settings Modal Overlay */
#ezchurch-cookie-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0,0,0,0.7) !important;
    z-index: 1000000 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}

#ezchurch-cookie-modal[style*="display: block"],
#ezchurch-cookie-modal[style*="display:block"] {
    display: flex !important;
}

.ezchurch-cookie-modal-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.ezchurch-cookie-modal-header {
    padding: 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ezchurch-cookie-modal-header h3 {
    margin: 0;
    font-size: 22px;
    color: #1a3a1b;
}

.ezchurch-cookie-close {
    background: none !important;
    border: none !important;
    font-size: 28px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    color: #999 !important;
    padding: 0 !important;
    width: 30px !important;
    height: 30px !important;
}

.ezchurch-cookie-close:hover {
    color: #333 !important;
    background: none !important;
}

.ezchurch-cookie-modal-body {
    padding: 25px;
}

.ezchurch-cookie-category {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.ezchurch-cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.ezchurch-cookie-category-header {
    margin-bottom: 10px;
}

.ezchurch-cookie-category-header label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.ezchurch-cookie-category-header input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.ezchurch-cookie-category-header input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.ezchurch-cookie-description {
    margin: 0;
    padding-left: 30px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.ezchurch-cookie-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .ezchurch-cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ezchurch-cookie-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .ezchurch-btn-primary,
    .ezchurch-btn-secondary {
        width: 100%;
    }
    
    .ezchurch-cookie-modal-content {
        margin: 20px;
    }
}

/* Spin animation for loading states */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.dashicons.spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}
