/* Storage Calculator Honeycomb Widget Styles */

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Color variables from calculator */
:root {
    --calc-orange: #EB8317;
    --calc-blue: #10375C;
    --calc-dark-gray: #222222;
    --calc-gray: #333333;
    --calc-light-gray: #929292;
    --calc-bg-light: #F1F7FE;
    --calc-white: #FFFFFF;
}

/* Default hex dimensions (will be overridden by inline styles) */
.storage-honeycomb-section {
    --hex-w: 130px;
    --hex-h: 150px;
    --hex-gap: 6px;
    --row-overlap: -22.5px;
    --shift-amount: 68px; /* (hex-w / 2) + (gap / 2) = (130 / 2) + (6 / 2) = 68px */
}

/* Section */
.storage-honeycomb-section {
    padding: 60px 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.storage-honeycomb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Title */
.storage-honeycomb-title {
    font-size: 32px;
    color: var(--calc-gray, #333333);
    margin-bottom: 40px;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
}

/* Rules wrapper */
.storage-rules-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    align-items: flex-start;
}

.storage-rules-column {
    flex: 1;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hex grid container */
.storage-hex-grid-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 30px;
    width: 100%;
}

/* Hex row */
.storage-hex-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--hex-gap);
    margin-top: var(--row-overlap);
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
    width: 100%;
}

.storage-hex-row:first-child {
    margin-top: 0;
    z-index: 10;
}

.storage-hex-row:nth-child(2) {
    z-index: 9;
}

.storage-hex-row:nth-child(3) {
    z-index: 8;
}

.storage-hex-row.offset-left {
    transform: translateX(calc(var(--shift-amount) * -1));
}

.storage-hex-row.offset-right {
    transform: translateX(calc(var(--shift-amount)));
}

/* Invisible hex for alignment */
.storage-hex-wrapper.storage-hex-invisible {
    visibility: hidden !important;
    pointer-events: none;
    opacity: 0;
}

.storage-hex-wrapper.storage-hex-invisible .storage-hex-border,
.storage-hex-wrapper.storage-hex-invisible .storage-hex-inner {
    visibility: hidden !important;
    opacity: 0;
}

/* Hex wrapper */
.storage-hex-wrapper {
    width: var(--hex-w);
    height: var(--hex-h);
    filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.15));
    transition: transform 0.2s;
}

.storage-hex-wrapper:hover {
    transform: scale(1.05);
    z-index: 50;
}

/* Hex border */
.storage-hex-border {
    width: 100%;
    height: 100%;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hex inner */
.storage-hex-inner {
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background-color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5px;
    gap: 5px;
}

/* Hex icon */
.storage-hex-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.storage-hex-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5;
}

/* Font Awesome and Elementor icons */
.storage-hex-icon i,
.storage-hex-icon .fa-icon,
.storage-hex-icon .eicon-icon {
    font-size: 32px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hex title */
.storage-hex-inner h4 {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.1;
    color: #2d3436;
    max-width: 90%;
}

/* Yellow type */
.storage-hex-wrapper.type-yellow .storage-hex-border {
    background-color: #d4a006;
}

.storage-hex-wrapper.type-yellow .storage-hex-inner {
    background-color: #FFC107;
}

.storage-hex-wrapper.type-yellow:hover .storage-hex-inner {
    background-color: #ffd54f;
}

/* Gray type */
.storage-hex-wrapper.type-gray .storage-hex-border {
    background-color: #888888;
}

.storage-hex-wrapper.type-gray .storage-hex-inner {
    background-color: #C3C3C3;
}

.storage-hex-wrapper.type-gray .storage-hex-inner h4 {
    color: white;
}

.storage-hex-wrapper.type-gray .storage-hex-icon svg {
    stroke: white;
}

/* Tablet */
@media (max-width: 900px) {
    .storage-rules-wrapper {
        flex-direction: column;
        gap: 30px;
    }
    
    .storage-rules-column {
        width: 100%;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .elementor-element {
        --hex-w: 135px;
        --hex-h: 155px;
    }

    /* Remove offsets on mobile */
    .storage-hex-row.offset-right,
    .storage-hex-row.offset-left {
        transform: none !important;
        margin: 0 !important;
    }

    /* Convert rows to grid */
    .storage-hex-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin: 0 !important;
        width: 100%;
        z-index: 1 !important;
    }

    /* Remove vertical shifts */
    .storage-hex-wrapper,
    .storage-hex-wrapper:nth-child(even),
    .storage-hex-wrapper:nth-child(odd) {
        margin: 0 !important;
        transform: none !important;
    }

    .storage-hex-grid-container {
        width: 100%;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .storage-hex-inner h4 {
        font-size: 11px;
        white-space: normal;
        line-height: 1.3;
        max-width: 95%;
    }

    .storage-hex-icon {
        width: 28px;
        height: 28px;
        margin-bottom: 5px;
    }

    .storage-honeycomb-title {
        font-size: 26px;
    }
}
