/**
 * Frontend Styles
 * საიტის წინა ნაწილის სტილები
 */

/* Size Guide Button */
.ssg-button-wrapper {
    margin: 15px 0;
}

.ssg-size-guide-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid rgba(176, 148, 112, 0.3);
    border-radius: 0;
    color: #1a1a1a;
    font-family: soteri, 'Inter', -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.ssg-size-guide-trigger:hover {
    background: #1a1a1a;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: none;
}

.ssg-size-guide-trigger svg {
    width: 20px;
    height: 20px;
}

/* Modal - AUR OCEÀ Style */
.ssg-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ssg-modal.ssg-modal-open {
    opacity: 1;
    visibility: visible;
}

/* Loading state for smoother appearance */
.ssg-modal.ssg-modal-loading .ssg-modal-content {
    opacity: 0.8;
}

/* Loading spinner */
.ssg-modal-loading-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.ssg-modal.ssg-modal-loading .ssg-modal-loading-spinner {
    display: block;
}

.ssg-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(246, 239, 227, 0.2);
    border-top-color: rgba(246, 239, 227, 0.8);
    border-radius: 50%;
    animation: ssgSpin 0.8s linear infinite;
}

@keyframes ssgSpin {
    to {
        transform: rotate(360deg);
    }
}

.ssg-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ssg-modal.ssg-modal-open .ssg-modal-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.ssg-modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.ssg-modal-content {
    position: relative;
    background: #1a1a1a;
    border-radius: 0;
    max-width: 950px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.ssg-modal.ssg-modal-open .ssg-modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Close Button - AUR OCEÀ Style */
.ssg-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(176, 148, 112, 0.1);
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    color: rgba(248, 246, 243, 0.6);
    transition: all 0.3s cubic-bezier(0.25, 0, 0.15, 1);
    border-radius: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ssg-modal-close:hover {
    background: rgba(176, 148, 112, 0.2);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ssg-modal-close:active {
    transform: rotate(90deg) scale(0.9);
}

.ssg-modal-close svg {
    display: block;
    width: 24px;
    height: 24px;
}

/* Modal Header - Modern Desktop Style */
.ssg-modal-header {
    padding: 24px 28px 18px;
    border-bottom: 2px solid rgba(246, 239, 227, 0.15);
    background: #1a1a1a;
}

.ssg-modal-title {
    margin: 0;
    font-family: soteri, 'Inter', -apple-system, sans-serif;
    font-size: 22px;
    color: #f6efe3;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 4px;
    line-height: 1.3;
    position: relative;
    padding-bottom: 8px;
}

/* Modal Body - Modern Desktop Style */
.ssg-modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    flex: 1;
    background: #1a1a1a;
}

/* Custom scrollbar */
.ssg-modal-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(246, 239, 227, 0.3) rgba(176, 148, 112, 0.1);
}

.ssg-modal-body::-webkit-scrollbar {
    width: 8px;
}

.ssg-modal-body::-webkit-scrollbar-track {
    background: rgba(176, 148, 112, 0.1);
    border-radius: 4px;
}

.ssg-modal-body::-webkit-scrollbar-thumb {
    background: rgba(246, 239, 227, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.ssg-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(246, 239, 227, 0.5);
}

/* Tabs - Modern Desktop Design */
.ssg-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 6px;
    background: rgba(176, 148, 112, 0.15);
    border-radius: 0;
    border: none;
}

.ssg-tab-button {
    background: transparent;
    border: none;
    padding: 12px 24px;
    font-family: soteri, 'Inter', -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: rgba(246, 239, 227, 0.8);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0, 0.15, 1);
    border-radius: 0;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.ssg-tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(246, 239, 227, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0;
}

.ssg-tab-button:hover {
    color: #f6efe3;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.ssg-tab-button:hover::before {
    opacity: 1;
}

.ssg-tab-button.active {
    color: #1a1a1a;
    background: rgba(246, 239, 227, 0.95);
    box-shadow: none;
    text-decoration: none;
    font-weight: 400;
    transform: translateY(-1px);
}

.ssg-tab-button.active::before {
    opacity: 0;
}

/* Tab Content - Smooth fade transitions */
.ssg-tab-content {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s ease;
    visibility: hidden;
}

.ssg-tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* Mobile tab content optimization */
@media screen and (max-width: 768px) {
    .ssg-tab-content {
        transition-duration: 0.25s;
    }
}

/* Chart Info - Modern Desktop Style */
.ssg-chart-info {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: rgba(176, 148, 112, 0.15);
    border-radius: 0;
    color: #f6efe3;
    border-left: 3px solid rgba(246, 239, 227, 0.4);
}

.ssg-chart-info h3 {
    margin: 0 0 8px 0;
    font-family: soteri, 'Inter', -apple-system, sans-serif;
    font-size: 16px;
    color: #f6efe3;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1.3;
}

.ssg-chart-meta {
    color: rgba(246, 239, 227, 0.9);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ssg-separator {
    margin: 0 8px;
}

/* Size Table - AUR OCEÀ Style */
/* Chart Sections - for multiple tables */
#ssg-charts-container {
    margin-top: 24px;
}

.ssg-unit-toggle {
    display: inline-flex;
    gap: 4px;
    margin: 0 0 18px;
    padding: 4px;
    background: rgba(246, 239, 227, 0.1);
    border: 1px solid rgba(246, 239, 227, 0.16);
}

.ssg-unit-toggle--inputs {
    margin-bottom: 18px;
}

.ssg-unit-button {
    min-width: 48px;
    padding: 8px 14px;
    border: 0;
    background: transparent;
    color: rgba(246, 239, 227, 0.78);
    font-family: soteri, 'Inter', -apple-system, sans-serif;
    font-size: 11px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    cursor: pointer;
}

.ssg-unit-button.active {
    background: rgba(246, 239, 227, 0.95);
    color: #1a1a1a;
}

.ssg-cell-value {
    display: none;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.ssg-unit-cm .ssg-cell-value-cm,
.ssg-unit-in .ssg-cell-value-in {
    display: inline-flex;
}

.ssg-cell-unit {
    color: rgba(246, 239, 227, 0.62);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .04em;
    text-transform: lowercase;
}

.ssg-chart-section {
    margin-bottom: 28px;
    clear: both;
    width: 100%;
    display: block;
    padding: 20px;
    background: rgba(176, 148, 112, 0.08);
    border-radius: 0;
    transition: background-color 0.3s ease;
}

.ssg-chart-section:hover {
    background: rgba(176, 148, 112, 0.12);
}

.ssg-chart-section:last-child {
    margin-bottom: 0;
}

.ssg-regular-fit-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(176, 148, 112, 0.25);
}

.ssg-loose-fit-section {
    margin-top: 24px;
    margin-bottom: 0;
    padding-top: 20px;
}

.ssg-section-title {
    margin: 0 0 16px 0;
    font-family: soteri, 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #f6efe3;
    text-transform: uppercase;
    letter-spacing: 3px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(246, 239, 227, 0.3);
    display: block;
    width: 100%;
    position: relative;
}

.ssg-section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: rgba(246, 239, 227, 0.8);
}

.ssg-table-wrapper {
    overflow-x: auto;
    margin-bottom: 24px;
    background: rgba(176, 148, 112, 0.1);
    padding: 16px;
    border-radius: 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(246, 239, 227, 0.3) rgba(176, 148, 112, 0.1);
}

.ssg-size-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
    font-family: soteri, 'Inter', -apple-system, sans-serif;
    background: transparent;
}

.ssg-size-table th {
    background: rgba(176, 148, 112, 0.2);
    color: #f6efe3;
    padding: 14px 12px;
    text-align: center;
    font-weight: 400;
    border: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.ssg-size-table td {
    padding: 14px 12px;
    border: none;
    text-align: center;
    background: transparent;
    color: #f6efe3;
    position: relative;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.ssg-size-table .ssg-measurement-label {
    font-weight: 400;
    color: #f6efe3;
    text-align: left;
    background: rgba(176, 148, 112, 0.15);
    padding-left: 16px;
    position: sticky;
    left: 0;
    z-index: 2;
}

/* Row separators - Modern styling */
.ssg-size-table tbody tr {
    transition: background-color 0.2s ease;
}

.ssg-size-table tbody tr:hover {
    background: rgba(246, 239, 227, 0.05);
}

.ssg-size-table tbody tr td {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.ssg-size-table tbody tr:last-child td {
    border-bottom: none;
}

.ssg-size-table thead tr th {
    border-bottom: 2px solid rgba(246, 239, 227, 0.3);
}

/* Coordinate hover effect - highlight row and column */
.ssg-size-table th.ssg-hover-col,
.ssg-size-table td.ssg-hover-col {
    background-color: rgba(246, 239, 227, 0.15) !important;
    box-shadow: inset 0 0 0 1px rgba(246, 239, 227, 0.2);
}

.ssg-size-table th.ssg-hover-row,
.ssg-size-table td.ssg-hover-row {
    background-color: rgba(246, 239, 227, 0.15) !important;
}

/* When both row and column are highlighted, make it darker */
.ssg-size-table th.ssg-hover-col.ssg-hover-row,
.ssg-size-table td.ssg-hover-col.ssg-hover-row {
    background-color: rgba(246, 239, 227, 0.25) !important;
    box-shadow: inset 0 0 0 1px rgba(246, 239, 227, 0.3);
}

/* Size Finder */
.ssg-size-finder,
.ssg-recommendation {
    display: none !important;
}

/* Override for Enter your measurements tab button */
#ssg-find-my-size {
    display: inline-block !important;
}

#ssg-size-finder-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.ssg-finder-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ssg-finder-input-group label {
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ssg-finder-input-group input {
    padding: 12px;
    border: none;
    border-radius: 0;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.ssg-finder-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.ssg-finder-input-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
}

.ssg-btn-primary {
    background: #b09470;
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 0;
    font-family: soteri, 'Inter', -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0, 0.15, 1);
    text-transform: uppercase;
    letter-spacing: 3px;
    box-shadow: none;
}

.ssg-btn-primary:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: none;
}

.ssg-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ssg-recommendation {
    margin-top: 24px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 0;
    font-size: 16px;
    text-align: center;
    display: none;
    transform: translateY(10px);
    opacity: 0;
    border: 1px solid rgba(246, 239, 227, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.ssg-recommendation.show {
    display: block;
    animation: ssgFadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ssg-recommendation strong {
    display: block;
    font-size: 24px;
    margin-top: 8px;
}

/* Enter Your Measurements Tab */
.ssg-enter-measurements-content {
    line-height: 1.8;
    color: #f6efe3;
    font-size: 14px;
}

.ssg-enter-measurements-content h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #f6efe3;
    font-weight: 400;
    font-size: 20px;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(246, 239, 227, 0.2);
}

.ssg-enter-measurements-content h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: rgba(246, 239, 227, 0.6);
}

.ssg-measurements-intro {
    margin-bottom: 24px;
    color: rgba(246, 239, 227, 0.95);
    opacity: 0.9;
    line-height: 1.7;
    font-size: 14px;
}

.ssg-measurements-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.ssg-measurement-input-group {
    display: flex;
    flex-direction: column;
}

.ssg-measurement-input-group label {
    margin-bottom: 8px;
    font-weight: 400;
    color: #f6efe3;
    font-size: 13px;
    letter-spacing: 0.2px;
    display: block;
}

.ssg-measurement-input {
    padding: 12px 16px;
    border: 2px solid rgba(246, 239, 227, 0.25);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.08);
    color: #f6efe3;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.ssg-measurement-input:focus {
    outline: none;
    border-color: rgba(246, 239, 227, 0.6);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px rgba(246, 239, 227, 0.1);
    transform: translateY(-1px);
}

.ssg-measurement-input:hover {
    border-color: rgba(246, 239, 227, 0.4);
    background: rgba(255, 255, 255, 0.1);
}

.ssg-measurement-input::placeholder {
    color: rgba(246, 239, 227, 0.5);
    font-weight: 400;
}

.ssg-measurements-actions {
    margin: 28px 0;
    text-align: center;
}

#ssg-find-my-size {
    padding: 14px 32px;
    background: #b09470;
    color: #fff;
    border: none;
    border-radius: 0;
    font-family: soteri, 'Inter', -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(176, 148, 112, 0.3);
    position: relative;
    overflow: hidden;
}

#ssg-find-my-size::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

#ssg-find-my-size:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: none;
}

#ssg-find-my-size:hover::before {
    left: 100%;
}

#ssg-find-my-size:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(176, 148, 112, 0.3);
}

.ssg-size-recommendation {
    margin: 28px 0;
    padding: 24px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 0;
    display: none;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(246, 239, 227, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ssg-size-recommendation.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.ssg-recommendation-success h4 {
    margin: 0 0 12px 0;
    color: #f6efe3;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.ssg-recommended-size-value {
    font-size: 36px;
    font-weight: 400;
    color: #f6efe3;
    margin: 12px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ssg-recommendation-success p {
    margin: 10px 0 0 0;
    color: #f6efe3;
    opacity: 0.9;
}

.ssg-recommendation-error {
    color: #f6efe3;
    padding: 15px;
    background: rgba(220, 53, 69, 0.2);
    border-radius: 4px;
}

.ssg-recommendation-custom {
    color: #f6efe3;
    padding: 24px;
    background: rgba(255, 193, 7, 0.15);
    border: 2px solid rgba(255, 193, 7, 0.4);
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.1);
}

.ssg-recommendation-custom h4 {
    margin: 0 0 16px 0;
    color: #f6efe3;
    font-size: 19px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.ssg-recommendation-custom p {
    margin: 10px 0;
    line-height: 1.6;
    color: #f6efe3;
}

.ssg-recommendation-custom strong {
    color: #f6efe3;
    font-weight: 400;
}

.ssg-contact-form-container {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid rgba(246, 239, 227, 0.2);
}

.ssg-contact-form-container p {
    margin-bottom: 15px;
    color: #f6efe3;
    font-weight: 400;
}

/* How to Measure - AUR OCEÀ Style */
.ssg-how-to-content {
    line-height: 1.8;
    color: #f6efe3;
    font-size: 14px;
}

.ssg-how-to-content h3 {
    margin-top: 0;
    color: #f6efe3;
    font-weight: 400;
}

.ssg-how-to-content ul {
    padding-left: 20px;
    margin: 10px 0 0 0;
}

.ssg-how-to-content li {
    margin-bottom: 10px;
    color: #f6efe3;
}

.ssg-how-to-content strong {
    color: #f6efe3;
    font-weight: 400;
}

.ssg-how-images {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.ssg-how-img {
    text-align: center;
}
.ssg-how-img img {
    max-width: 260px;
    width: 100%;
    height: auto;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 4px;
}
.ssg-how-img p {
    margin-top: 6px;
    color: #f6efe3;
}
.ssg-how-note {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(246, 239, 227, 0.8);
}

/* Modal Footer - Modern Desktop Style */
.ssg-modal-footer {
    padding: 20px 28px;
    border-top: 2px solid rgba(246, 239, 227, 0.15);
    background: #1a1a1a;
    border-radius: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.ssg-footer-note {
    margin: 0;
    font-size: 13px;
    color: #f6efe3;
    text-align: center;
    line-height: 1.6;
    transition: opacity 0.3s ease;
}

/* Hide footer note when footer is hidden */
.ssg-modal-footer[style*="display: none"] .ssg-footer-note,
.ssg-modal-footer[style*="opacity: 0"] .ssg-footer-note {
    display: none;
}

.ssg-footer-note strong {
    font-weight: 400;
}

/* Animations */
@keyframes ssgFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media screen and (max-width: 768px) {
    .ssg-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .ssg-modal-container {
        padding: 0;
    }
    
    .ssg-modal-header,
    .ssg-modal-body,
    .ssg-modal-footer {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .ssg-modal-header {
        padding-top: 12px;
        padding-bottom: 8px;
    }
    
    .ssg-modal-body {
        padding-top: 12px;
        padding-bottom: 12px;
    }
    
    .ssg-modal-title {
        font-size: 16px;
        padding-right: 40px;
        letter-spacing: 0.8px;
        line-height: 1.3;
    }
    
    /* Close button optimization for mobile */
    .ssg-modal-close {
        top: 12px;
        right: 12px;
        padding: 6px;
    }
    
    .ssg-modal-close svg {
        width: 20px;
        height: 20px;
    }
    
    /* Smooth scrolling for mobile */
    .ssg-modal-body {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Custom scrollbar for mobile (if supported) */
    .ssg-modal-body::-webkit-scrollbar {
        width: 4px;
    }
    
    .ssg-modal-body::-webkit-scrollbar-track {
        background: rgba(176, 148, 112, 0.1);
    }
    
    .ssg-modal-body::-webkit-scrollbar-thumb {
        background: rgba(246, 239, 227, 0.3);
        border-radius: 2px;
    }
    
    .ssg-modal-body::-webkit-scrollbar-thumb:hover {
        background: rgba(246, 239, 227, 0.5);
    }
    
    /* Touch optimization */
    .ssg-tab-button,
    #ssg-find-my-size,
    .ssg-modal-close {
        -webkit-tap-highlight-color: rgba(246, 239, 227, 0.2);
        touch-action: manipulation;
    }
    
    /* Prevent text selection on buttons */
    .ssg-tab-button {
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Chart sections spacing */
    .ssg-chart-section {
        margin-bottom: 16px;
    }

    .ssg-unit-toggle {
        width: 100%;
        margin-bottom: 12px;
    }

    .ssg-unit-button {
        flex: 1;
        padding: 8px 10px;
        font-size: 10px;
    }
    
    .ssg-regular-fit-section {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    
    .ssg-loose-fit-section {
        margin-top: 16px;
        padding-top: 12px;
    }
    
    /* Modern compact pill-style tabs for mobile - all 3 tabs visible */
    .ssg-tabs {
        display: flex;
        gap: 4px;
        margin-bottom: 16px;
        padding: 3px;
        background: rgba(176, 148, 112, 0.2);
        border-radius: 0;
        overflow: hidden;
        -webkit-overflow-scrolling: touch;
        justify-content: stretch;
        width: 100%;
        border: none;
    }
    
    .ssg-tab-button {
        flex: 1;
        padding: 8px 4px;
        font-size: 10px;
        font-weight: 400;
        white-space: nowrap;
        min-width: 0;
        text-align: center;
        letter-spacing: 0.1px;
        border-radius: 0;
        position: relative;
        background: transparent;
        border: none;
        color: rgba(246, 239, 227, 0.7);
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        text-transform: none;
        margin-bottom: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.2;
    }
    
    /* Optimize for very small screens */
    @media screen and (max-width: 360px) {
        .ssg-tab-button {
            padding: 7px 3px;
            font-size: 9px;
            letter-spacing: 0;
        }
    }
    
    /* Active tab - modern pill style */
    .ssg-tab-button.active {
        background: rgba(246, 239, 227, 0.95);
        color: #f8f6f3;
        border-bottom: none;
        text-decoration: none;
        font-weight: 400;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        transform: scale(1.02);
    }
    
    /* Remove hover effect on mobile (touch devices) */
    .ssg-tab-button:hover {
        background: transparent;
        color: rgba(246, 239, 227, 0.7);
    }
    
    .ssg-tab-button.active:hover {
        background: rgba(246, 239, 227, 0.95);
        color: #f8f6f3;
    }
    
    /* Chart info optimization for mobile - compact and elegant */
    .ssg-chart-info {
        margin-bottom: 12px;
        padding: 10px 0;
    }
    
    .ssg-chart-info h3 {
        font-size: 15px;
        margin-bottom: 6px;
        line-height: 1.3;
        letter-spacing: 0.5px;
    }
    
    .ssg-chart-meta {
        font-size: 10px;
        opacity: 0.85;
        line-height: 1.4;
    }
    
    .ssg-separator {
        margin: 0 6px;
    }
    
    /* Table optimization for mobile - compact and readable */
    .ssg-table-wrapper {
        margin-bottom: 16px;
        padding: 8px 0;
        border-radius: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        background: rgba(176, 148, 112, 0.1);
    }
    
    .ssg-size-table {
        font-size: 10px;
        border-collapse: separate;
        border-spacing: 0;
        width: 100%;
        min-width: 100%;
    }
    
    .ssg-size-table th {
        padding: 8px 5px;
        font-size: 9px;
        font-weight: 400;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        white-space: nowrap;
    }
    
    .ssg-size-table td {
        padding: 7px 5px;
        white-space: nowrap;
    }
    
    .ssg-size-table .ssg-measurement-label {
        font-size: 9px;
        padding-left: 8px;
        font-weight: 400;
        text-align: left;
        position: sticky;
        left: 0;
        background: rgba(155, 136, 116, 0.95);
        z-index: 1;
    }
    
    /* Section titles - compact */
    .ssg-section-title {
        font-size: 13px;
        margin-bottom: 10px;
        padding-bottom: 6px;
        letter-spacing: 0.5px;
    }
    
    /* Input forms optimization - modern card style */
    #ssg-size-finder-inputs {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .ssg-measurements-form {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .ssg-measurement-input-group {
        margin-bottom: 0;
    }
    
    .ssg-measurement-input-group label {
        font-size: 11px;
        margin-bottom: 6px;
        font-weight: 400;
        letter-spacing: 0.2px;
        opacity: 0.9;
    }
    
    .ssg-measurement-input {
        padding: 11px 12px;
        font-size: 15px;
        border-radius: 0;
        border: 1.5px solid rgba(246, 239, 227, 0.25);
        background: rgba(255, 255, 255, 0.08);
        transition: all 0.2s ease;
    }
    
    .ssg-measurement-input:focus {
        border-color: rgba(246, 239, 227, 0.6);
        background: rgba(255, 255, 255, 0.12);
        box-shadow: 0 0 0 3px rgba(246, 239, 227, 0.1);
    }
    
    /* Button optimization - modern and prominent */
    .ssg-measurements-actions {
        margin: 18px 0;
    }
    
    #ssg-find-my-size {
        padding: 13px 24px;
        font-size: 13px;
        width: 100%;
        border-radius: 0;
        font-weight: 400;
        letter-spacing: 0.5px;
        box-shadow: 0 2px 8px rgba(176, 148, 112, 0.3);
        margin-top: 0;
        transition: all 0.2s ease;
    }
    
    #ssg-find-my-size:active {
        transform: translateY(1px) scale(0.98);
        box-shadow: 0 1px 4px rgba(176, 148, 112, 0.3);
    }
    
    /* How to measure content - clean and readable */
    .ssg-how-to-content {
        font-size: 13px;
        line-height: 1.7;
        color: rgba(246, 239, 227, 0.95);
    }
    
    .ssg-how-to-content h3 {
        font-size: 15px;
        margin-bottom: 10px;
        font-weight: 400;
        letter-spacing: 0.3px;
    }
    
    .ssg-how-to-content ul {
        padding-left: 18px;
        margin: 8px 0;
    }
    
    .ssg-how-to-content li {
        margin-bottom: 8px;
    }
    
    /* Enter measurements content - clean layout */
    .ssg-enter-measurements-content {
        font-size: 13px;
        line-height: 1.7;
    }
    
    .ssg-enter-measurements-content h3 {
        font-size: 15px;
        margin-bottom: 10px;
        font-weight: 400;
        letter-spacing: 0.3px;
    }
    
    .ssg-measurements-intro {
        font-size: 12px;
        margin-bottom: 14px;
        opacity: 0.9;
        line-height: 1.6;
    }
    
    /* Footer optimization - compact */
    .ssg-modal-footer {
        padding-top: 12px;
        padding-bottom: 12px;
        transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
    }
    
    .ssg-footer-note {
        font-size: 10px;
        line-height: 1.5;
        opacity: 0.85;
    }
    
    /* Contact form container - mobile optimization */
    .ssg-contact-form-container {
        margin-top: 20px;
        padding-top: 16px;
    }
    
    .ssg-contact-form-container p {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    /* How to measure images - mobile optimization */
    .ssg-how-images {
        gap: 12px;
        margin-top: 12px;
        flex-direction: column;
    }
    
    .ssg-how-img {
        width: 100%;
    }
    
    .ssg-how-img img {
        max-width: 100%;
        border-radius: 0;
    }
    
    .ssg-how-img p {
        font-size: 11px;
        margin-top: 6px;
    }
    
    .ssg-how-note {
        font-size: 10px;
    }
    
    /* Recommendation boxes - modern card style */
    .ssg-size-recommendation {
        border-radius: 0;
        margin-top: 16px;
        padding: 16px;
    }
    
    .ssg-recommendation-success h4 {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .ssg-recommended-size-value {
        font-size: 26px;
        margin: 8px 0;
    }
    
    .ssg-recommendation-success p {
        font-size: 12px;
        margin-top: 8px;
    }
    
    .ssg-recommendation-custom {
        padding: 14px;
    }
    
    .ssg-recommendation-custom h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .ssg-recommendation-custom p {
        font-size: 12px;
        line-height: 1.6;
    }
    
    .ssg-recommendation-error {
        padding: 12px;
        font-size: 12px;
    }
    
    /* Additional optimizations for very small screens */
    @media screen and (max-width: 480px) {
        .ssg-modal-header,
        .ssg-modal-body,
        .ssg-modal-footer {
            padding-left: 10px;
            padding-right: 10px;
        }
        
        .ssg-modal-title {
            font-size: 15px;
        }
        
        .ssg-tabs {
            gap: 3px;
            padding: 2px;
            margin-bottom: 14px;
        }
        
        .ssg-tab-button {
            padding: 7px 4px;
            font-size: 9px;
            letter-spacing: 0;
        }
        
        .ssg-chart-info h3 {
            font-size: 14px;
        }
        
        .ssg-size-table {
            font-size: 9px;
        }
        
        .ssg-size-table th,
        .ssg-size-table td {
            padding: 6px 3px;
        }
        
        .ssg-size-table th {
            font-size: 8px;
        }
        
        .ssg-size-table .ssg-measurement-label {
            font-size: 8px;
        }
        
        .ssg-measurement-input {
            padding: 10px;
            font-size: 14px;
        }
        
        #ssg-find-my-size {
            padding: 12px 20px;
            font-size: 12px;
        }
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .ssg-modal-content {
        background: #1a1a1a;
    }
    
    .ssg-modal-title,
    .ssg-chart-info h3,
    .ssg-how-to-content,
    .ssg-notes-content {
        color: #e0e0e0;
    }
    
    .ssg-modal-header,
    .ssg-modal-footer {
        border-color: rgba(176, 148, 112, 0.15);
    }
    
    .ssg-size-table th {
        background: #2d2d2d;
    }
    
    .ssg-size-table td {
        border-color: rgba(176, 148, 112, 0.15);
    }
    
    .ssg-size-table tbody tr:hover {
        background: #2d2d2d;
    }
    
    .ssg-modal-close:hover {
        background: #2d2d2d;
    }
    
    .ssg-modal-close {
        color: #e0e0e0;
    }
}

/* Inline Chart */
.ssg-inline-chart {
    margin: 20px 0;
}

.ssg-inline-trigger {
    display: flex;
}

