/**
 * GroupMart Cookie Consent Plugin Styles
 * Version: 1.1.0 - Compact Mobile Design
 */

/* Import Poppins Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Cookie Consent Overlay - Removed to allow browsing */
#gm-cookie-consent-overlay {
    display: none !important;
}

/* Cookie Consent Banner - Minimal Bottom Left Card */
#gm-cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: 380px;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    z-index: 1000000;
    display: none;
    animation: slideInLeft 0.4s ease-out;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    border-radius: 12px;
}

#gm-cookie-consent-banner.show,
#gm-cookie-consent-overlay.show {
    display: block;
}

/* Content Container */
.gm-cookie-content {
    max-width: 100%;
}

/* Header Section */
.gm-cookie-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.gm-cookie-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    background-image: url('https://cdn-icons-png.flaticon.com/512/541/541732.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.gm-cookie-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

/* Description Section */
.gm-cookie-description {
    font-size: 13px;
    line-height: 1.5;
    color: #4a4a4a;
    margin-bottom: 16px;
}

.gm-cookie-description p {
    margin: 0 0 10px 0;
}

.gm-cookie-description p:last-child {
    margin-bottom: 0;
}

.gm-cookie-description a {
    color: #0066cc;
    text-decoration: underline;
}

.gm-cookie-description a:hover {
    color: #004999;
}

/* Cookie Options Section */
.gm-cookie-options {
    display: none;
    margin-bottom: 16px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
}

.gm-cookie-options.show {
    display: block;
}

/* Individual Cookie Option */
.gm-cookie-option {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.gm-cookie-option:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.gm-cookie-option-content {
    flex: 1;
}

.gm-cookie-option-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.gm-cookie-option-description {
    font-size: 12px;
    color: #6a6a6a;
    line-height: 1.4;
}

/* Toggle Switch */
.gm-cookie-toggle {
    margin-left: 12px;
    position: relative;
}

.gm-cookie-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.gm-cookie-toggle-slider {
    display: inline-block;
    width: 44px;
    height: 22px;
    background-color: #ccc;
    border-radius: 22px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
}

.gm-cookie-toggle-slider:before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.gm-cookie-toggle input[type="checkbox"]:checked + .gm-cookie-toggle-slider {
    background-color: #4CAF50;
}

.gm-cookie-toggle input[type="checkbox"]:checked + .gm-cookie-toggle-slider:before {
    transform: translateX(22px);
}

.gm-cookie-toggle input[type="checkbox"]:disabled + .gm-cookie-toggle-slider {
    background-color: #4CAF50;
    opacity: 0.6;
    cursor: not-allowed;
}

.gm-cookie-toggle input[type="checkbox"]:focus + .gm-cookie-toggle-slider {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

/* Buttons Section - Compact Layout */
.gm-cookie-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Button Styles - Smaller and Compact */
.gm-cookie-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-family: inherit;
}

.gm-cookie-btn:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

.gm-cookie-btn-primary {
    background-color: #0066cc;
    color: white;
}

.gm-cookie-btn-primary:hover {
    background-color: #004999;
}

.gm-cookie-btn-primary:active {
    background-color: #003d7a;
}

.gm-cookie-btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.gm-cookie-btn-secondary:hover {
    background-color: #e0e0e0;
}

.gm-cookie-btn-secondary:active {
    background-color: #d0d0d0;
}

.gm-cookie-btn-link {
    background: none;
    color: #0066cc;
    text-decoration: underline;
    padding: 8px 12px;
}

.gm-cookie-btn-link:hover {
    color: #004999;
}

.gm-cookie-btn-link:active {
    color: #003d7a;
}

/* Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

@keyframes slideInLeft {
    from { 
        transform: translateX(-100%);
        opacity: 0;
    }
    to { 
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from { 
        transform: translateY(100%);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================================
   MOBILE RESPONSIVE - COMPACT VERSION
   ============================================================ */
@media (max-width: 768px) {
    #gm-cookie-consent-banner {
        bottom: 12px;
        left: 12px;
        right: 12px;
        max-width: calc(100% - 24px);
        padding: 12px 14px;
        border-radius: 10px;
        animation: slideInUp 0.3s ease-out;
    }

    /* Compact header */
    .gm-cookie-header {
        margin-bottom: 8px;
    }

    .gm-cookie-icon {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }

    .gm-cookie-title {
        font-size: 14px;
    }

    /* Shorter description - single line with ellipsis or very short */
    .gm-cookie-description {
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 12px;
    }

    .gm-cookie-description p {
        margin: 0;
    }

    /* Hide extra paragraphs on mobile if needed */
    .gm-cookie-description p:not(:first-child) {
        display: none;
    }

    /* Compact buttons - inline row */
    .gm-cookie-buttons {
        display: flex;
        gap: 6px;
        flex-wrap: nowrap;
    }

    .gm-cookie-btn {
        padding: 6px 12px;
        font-size: 11px;
        border-radius: 5px;
        flex: 1;
    }

    .gm-cookie-btn-link {
        padding: 6px 8px;
        flex: 0 0 auto;
    }

    /* Compact cookie options when expanded */
    .gm-cookie-options {
        padding: 10px;
        margin-bottom: 12px;
        max-height: 40vh;
        overflow-y: auto;
    }

    .gm-cookie-option {
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .gm-cookie-option-title {
        font-size: 12px;
    }

    .gm-cookie-option-description {
        font-size: 11px;
        display: none; /* Hide descriptions on mobile for compactness */
    }

    .gm-cookie-toggle-slider {
        width: 36px;
        height: 18px;
    }

    .gm-cookie-toggle-slider:before {
        height: 12px;
        width: 12px;
    }

    .gm-cookie-toggle input[type="checkbox"]:checked + .gm-cookie-toggle-slider:before {
        transform: translateX(18px);
    }
}

/* Extra small mobile devices */
@media (max-width: 380px) {
    #gm-cookie-consent-banner {
        bottom: 8px;
        left: 8px;
        right: 8px;
        max-width: calc(100% - 16px);
        padding: 10px 12px;
    }

    .gm-cookie-header {
        margin-bottom: 6px;
    }

    .gm-cookie-icon {
        width: 18px;
        height: 18px;
    }

    .gm-cookie-title {
        font-size: 13px;
    }

    .gm-cookie-description {
        font-size: 11px;
        margin-bottom: 10px;
    }

    .gm-cookie-buttons {
        gap: 4px;
    }

    .gm-cookie-btn {
        padding: 5px 10px;
        font-size: 10px;
    }
}

/* Tablet Styles */
@media (max-width: 1024px) and (min-width: 769px) {
    #gm-cookie-consent-banner {
        max-width: 340px;
        padding: 16px;
    }
}

/* Print Styles */
@media print {
    #gm-cookie-consent-banner,
    #gm-cookie-consent-overlay {
        display: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    #gm-cookie-consent-banner {
        border: 2px solid #000;
    }

    .gm-cookie-btn-primary {
        border: 2px solid #000;
    }

    .gm-cookie-toggle-slider {
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    #gm-cookie-consent-banner,
    #gm-cookie-consent-overlay {
        animation: none;
    }

    .gm-cookie-toggle-slider:before {
        transition: none;
    }
}

/* Dark Mode Support (Optional - uncomment if needed) */
/*
@media (prefers-color-scheme: dark) {
    #gm-cookie-consent-banner {
        background: #2a2a2a;
        color: #ffffff;
    }

    .gm-cookie-title,
    .gm-cookie-option-title {
        color: #ffffff;
    }

    .gm-cookie-description,
    .gm-cookie-option-description {
        color: #cccccc;
    }

    .gm-cookie-options {
        background: #1a1a1a;
    }

    .gm-cookie-option {
        border-bottom-color: #3a3a3a;
    }

    .gm-cookie-btn-secondary {
        background-color: #3a3a3a;
        color: #ffffff;
    }

    .gm-cookie-btn-secondary:hover {
        background-color: #4a4a4a;
    }
}
*/