/* Ilfusion Cookie Manager - Frontend Styles */

/* Cookie Banner Base */
.icm-banner {
    position: fixed;
    z-index: 999999;
    background: #0084d6;
    color: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.25);
    animation: icm-slide-in 0.3s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Position Variants */
.icm-position-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
}

.icm-position-top {
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

.icm-position-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 600px;
    width: 90%;
    border-radius: 8px;
}

/* Theme Variants */
.icm-theme-light {
    background: #fff;
    color: #333;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
}

.icm-theme-light .icm-btn {
    color: #333;
}

.icm-theme-dark {
    background: #0084d6;
    color: #fff;
}

/* Banner Content */
.icm-banner-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

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

.icm-banner-text h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
}

.icm-banner-text p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.9;
}

.icm-banner-text a {
    color: #fff;
    text-decoration: underline;
    font-size: 14px;
    margin-right: 15px;
}

.icm-banner-text a:hover {
    text-decoration: underline;
}

.icm-theme-light .icm-banner-text a {
    color: #2980b9;
}

/* Banner Actions */
.icm-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.icm-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.icm-btn-accept {
    background: #ef4127;
    color: #fff;
}

.icm-btn-accept:hover {
    background: #c53f2a;
}

.icm-btn-reject {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.icm-btn-reject:hover {
    background: rgba(255,255,255,0.1);
}

.icm-btn-settings {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.icm-btn-settings:hover {
    background: rgba(255,255,255,0.1);
}

.icm-theme-light .icm-btn-reject,
.icm-theme-light .icm-btn-settings {
    border-color: #ddd;
}

.icm-theme-light .icm-btn-reject:hover,
.icm-theme-light .icm-btn-settings:hover {
    background: #f8f9fa;
}

/* Modal Styles */
.icm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999999;
    animation: icm-fade-in 0.2s ease-out;
}

.icm-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.icm-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: icm-slide-up 0.3s ease-out;
}

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

.icm-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.icm-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icm-modal-close:hover {
    color: #333;
}

.icm-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.icm-modal-body p {
    margin: 0 0 20px 0;
    color: #666;
    line-height: 1.6;
}

.icm-modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* Cookie Categories */
.icm-cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.icm-category {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    background: #f8f9fa;
}

.icm-category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.icm-category-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    flex: 1;
}

.icm-category p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Toggle Switch */
.icm-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

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

.icm-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 26px;
}

.icm-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.icm-toggle input:checked + .icm-toggle-slider {
    background-color: #ef4127;
}

.icm-toggle input:checked + .icm-toggle-slider:before {
    transform: translateX(24px);
}

.icm-toggle input:disabled + .icm-toggle-slider {
    background-color: #ef4127;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Save Settings Button */
.icm-btn-save-settings {
    background: #ef4127;
    color: #fff;
}


/* Animations */
@keyframes icm-slide-in {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes icm-slide-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes icm-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Floating Cookie Settings Button */
.icm-floating-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999998;
    background: #0083d4;
	color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    white-space: nowrap
}

.icm-floating-button.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    animation: icm-float-in 0.4s ease-out;
}

.icm-floating-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.icm-floating-button:active {
    transform: translateY(0);
}

.icm-floating-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Light theme for floating button */
.icm-floating-button.icm-theme-light {
    background: #fff;
    color: #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.icm-floating-button.icm-theme-light:hover {
    background: #f8f9fa;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Animation for floating button */
@keyframes icm-float-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.icm-floating-button.visible {
    animation: icm-float-in 0.4s ease-out;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .icm-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .icm-banner-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .icm-btn {
        width: 100%;
        text-align: center;
    }
    
    .icm-modal-content {
        max-height: 100vh;
        height: 100%;
        max-width: 100%;
        border-radius: 0;
    }
    
    /* Adjust floating button for mobile */
    .icm-floating-button {
        bottom: 15px;
        left: 15px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .icm-floating-button svg {
        width: 16px;
        height: 16px;
    }
}
