/* SHL Promo Engine - Base Styles v5.2.1 */

.shl-promo-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    text-align: center;
    line-height: 1.5;

    /* Global Icon Geometry Defaults */
    --shl-icon-size: 80px;
    --shl-icon-top: 0;
    --shl-icon-left: 0;
    --shl-icon-radius: 50%;
    --shl-icon-border: 4px;
    --shl-icon-border-color: #dadada;
    --shl-icon-clip: none;
}

.shl-gsr-header {
    display: flex;
    align-items: center;
    gap: 18px;
    text-align: left;
    position: relative;
}

/* v5.2.9 SHADOW SHELL
   DARKER SHADOW: Increased opacity from 0.55 to 0.75 for more depth.
*/
.shl-gsr-icon {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
    clip-path: none !important;
    
    /* Darker, aggressive shadow for high-end contrast */
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.75));
    
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible !important; 
    flex-shrink: 0;
    z-index: 10;
}

/* v5.2.9 CONTENT LAYER
   THICKER BORDER: Increased moat from 4px to 10px.
*/
.shl-gsr-icon-inner {
    width: 100% !important;
    height: 100% !important;
    background: #FFFFFF !important;
    clip-path: var(--shl-icon-clip) !important;
    padding: 10px !important; /* Premium 10px thick white border */
    box-sizing: border-box !important;
    
    /* AA-Hardening remains active */
    outline: 1px solid #FFFFFF;
    outline-offset: -1px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden !important;
}

/* v5.2.3 IMAGE LAYER
   Slight scale increase to bridge the gap and remove the black ring.
*/
.shl-gsr-icon img, 
.shl-gsr-icon svg {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    background: transparent !important; /* Removed white background here */
    clip-path: var(--shl-icon-clip) !important;
    
    /* Scale fix: Expands image 1% to seal the edge gap */
    transform: scale(1.02);
    display: block;
}


.shl-gsr-info {
    flex-grow: 1;
}

.shl-gsr-title {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--shl-text) !important;
    line-height: 1.2;
}

.shl-gsr-dev {
    display: block;
    font-size: 14px;
    color: var(--shl-text-dim) !important;
}

.shl-btn-primary {
    background-color: var(--shl-primary);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
}

.shl-btn-primary:hover { opacity: 0.9; }

.shl-btn-primary:disabled,
.shl-btn-disabled {
    background-color: #666666;
    cursor: not-allowed;
    opacity: 0.6;
}

.shl-success-box {
    background-color: rgba(var(--shl-primary-rgb), 0.05);
    border: 1px solid var(--shl-border);
    border-radius: 8px;
    padding: 24px 20px;
    text-align: center;
    color: var(--shl-text);
    margin-bottom: 20px;
}

/* PRESERVED: Expiration & Pulse Logic */
.shl-exp-text {
    font-size: 13px;
    color: var(--shl-text-dim);
    margin-top: 10px;
    font-weight: 500;
}
.shl-exp-warning { color: #FF9F0A !important; }
.shl-exp-urgent {
    color: #FF453A !important;
    font-weight: 700;
}
.shl-pulse { animation: shl-pulse-anim 2s infinite; }

@keyframes shl-pulse-anim {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.shl-code-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: 20px;
    font-weight: 700;
    background: #000000;
    color: #FFFFFF;
    padding: 8px 16px;
    border-radius: 6px;
    letter-spacing: 2px;
    display: inline-block;
    word-break: break-all;
    margin-top: 5px;
    border: 1px solid #444;
    min-width: 180px;
}

/* PRESERVED: Copy Button Styles */
.shl-btn-copy {
    background-color: #3A3A3C;
    color: #ffffff;
    border: none;
    padding: 18px 25px;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    flex: 1 1 0;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
}

.shl-btn-copy:hover {
    background-color: #4A4A4C;
    transform: translateY(-1px);
}

.shl-btn-redeem {
    background-color: #00875F;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 18px 25px;
    font-size: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex: 1 1 0;
    text-align: center;
    transition: all 0.2s ease;
    box-sizing: border-box;
    white-space: nowrap;
}

.shl-btn-redeem:hover {
    background-color: #006b4b;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* PRESERVED: Link & Branding Hover Effects */
.shl-gsr-title a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 0.2s ease, opacity 0.2s ease;
}
.shl-gsr-title a:hover {
    opacity: 0.85;
    text-decoration: underline !important;
    text-underline-offset: 4px;
}
.shl-branding-link {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: left center;
}
.shl-branding-link:hover { transform: scale(1.05); }

.shl-zoomable {
    cursor: zoom-in;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.shl-zoomable:hover { transform: scale(1.05); }

/* Modal System (Consolidated Logic) */
.shl-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000001; 
    display: none; 
    align-items: center;
    justify-content: center;
    cursor: pointer; 
    pointer-events: auto !important; 
    animation: shl-fade-in 0.3s ease-out;
}

.shl-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    background: var(--shl-surface, #1C1C1E);
    padding: 30px;
    border-radius: 24px;
    border: 1px solid var(--shl-border, #3A3A3C);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    color: var(--shl-text, #FFFFFF);
    cursor: default; 
    z-index: 1000001; 
}

.shl-help-modal h3, 
.shl-help-modal strong {
    color: #F5F5F7 !important;
    font-weight: 700;
}

.shl-help-modal h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
}

/* PRESERVED: Focus & Close Button Hardening */
.shl-modal-content:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--shl-primary-rgb), 0.5), 0 20px 50px rgba(0,0,0,0.6);
}

.shl-modal-close:focus,
.shl-icon-modal-close:focus {
    outline: 2px solid var(--shl-primary);
    outline-offset: 4px;
}

/* Icon-Specific Content Sizing */
.shl-icon-modal-content {
    padding: 25px;
    min-width: 300px;
    min-height: 300px;
    align-items: center;
    justify-content: center;
}

.shl-icon-modal-content img,
.shl-icon-modal-content svg {
    width: 450px !important;
    height: 450px !important;
    max-width: 80vw !important;
    max-height: 80vh !important;
    object-fit: cover !important;
    border-radius: 12px;
}

.shl-icon-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #FFFFFF;
    font-size: 32px;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s ease;
    z-index: 20;
    padding: 10px;
}

.shl-icon-modal-close:hover { transform: scale(1.1); }

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

/* Mobile Responsive Stacking */
@media (max-width: 600px) {
    .shl-promo-container {
        margin-top: 100px;
        padding: 0 15px;
        --shl-icon-size: 180px;
        --shl-icon-top: 0;
        --shl-icon-left: 0;
    }
    .shl-gsr-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        min-height: 0;
        gap: 10px;
        margin-bottom: 25px;
    }
    .shl-gsr-icon {
        position: relative;
        top: var(--shl-icon-top);
        left: var(--shl-icon-left);
        margin: -110px auto 15px auto;
        width: var(--shl-icon-size);
        height: var(--shl-icon-size);
    }
    .shl-gsr-info { margin-left: 0; }
    .shl-gsr-title { font-size: 20px; }
}

/* --- Icon Shape System (High Fidelity Geometry) --- */
.shl-shape-circle   { --shl-icon-clip: circle(50% at 50% 50%) !important; }
.shl-shape-square   { --shl-icon-clip: none !important; }
.shl-shape-rounded  { --shl-icon-clip: inset(0% round 12%) !important; }

/* True Superellipse Squircle (60-point High Density Polygon) */
.shl-shape-squircle { 
    --shl-icon-clip: polygon(
        50% 0%, 58.33% 0.1%, 66.21% 0.81%, 73.2% 2.29%, 79% 4.79%, 83.43% 8.44%, 86.82% 12.9%, 89.17% 18.04%, 90.66% 23.8%, 91.56% 30.15%, 92.1% 37.04%, 92.5% 44.44%, 92.71% 52.34%, 92.71% 60.75%, 92.5% 69.69%, 92.1% 79.16%, 91.56% 89.17%, 90.66% 94.75%, 89.17% 97.46%, 86.82% 98.66%, 83.43% 99.3%, 79% 99.63%, 73.2% 99.82%, 66.21% 99.93%, 58.33% 99.98%, 50% 100%, 41.67% 99.98%, 33.79% 99.93%, 26.8% 99.82%, 21% 99.63%, 16.57% 99.3%, 13.18% 98.66%, 10.83% 97.46%, 9.34% 94.75%, 8.44% 89.17%, 7.9% 79.16%, 7.5% 69.69%, 7.29% 60.75%, 7.29% 52.34%, 7.5% 44.44%, 7.9% 37.04%, 8.44% 30.15%, 9.34% 23.8%, 10.83% 18.04%, 13.18% 12.9%, 16.57% 8.44%, 21% 4.79%, 26.8% 2.29%, 33.79% 0.81%, 41.67% 0.1%
    ) !important;
}

/* Subtle 8-Point Scalloped Wavy (32-point High Density Polygon) */
.shl-shape-wavy { 
    --shl-icon-clip: polygon(
        50% 0%, 57% 1%, 65% 5%, 70% 10%, 75% 15%, 82% 16%, 89% 21%, 93% 28%, 96% 36%, 99% 43%, 100% 51%, 99% 58%, 96% 65%, 93% 73%, 89% 80%, 82% 84%, 75% 86% , 70% 90% , 62% 95% , 56% 99% , 49% 100% , 41% 99% , 33% 95% , 26% 90% , 20% 86% , 15% 81% , 8% 78% , 4% 70% , 1% 62% , 0% 53% , 1% 45% , 4% 38% , 8% 30% , 14% 24% , 20% 18% , 28% 13% , 37% 7% , 46% 1% 
    ) !important;
}
