/* GS1 NZ Sign-Up - Essential Brand Styles Only */

/* GS1 Icons Font */
@font-face {
    font-family: 'GS1-icons';
    src: url('../fonts/GS1-icons.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.icon-gs1-facebook-option-1:before,
.icon-gs1-linkedin-option-1:before {
    font-family: 'GS1-icons';
    font-style: normal;
    font-weight: normal;
    font-size: 40px;
    color: #002d6c;
    transition: color 0.2s ease;
}

.footer-social-icon-link:hover .icon-gs1-facebook-option-1:before,
.footer-social-icon-link:hover .icon-gs1-linkedin-option-1:before {
    color: #00b6de;
}

.icon-gs1-facebook-option-1:before {
    content: "\e923";
}

.icon-gs1-linkedin-option-1:before {
    content: "\e937";
}

/* Text utility classes */
.text-normalcase {
    text-transform: none !important;
}

/* Alpine.js x-cloak directive - hide elements until Alpine initializes */
[x-cloak] {
    display: none !important;
}

/* HTMX loading indicator */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

/* GS1 Brand Colors */
.bg-gs1-primary {
    background-color: #002d6c !important;
}

.gs1-primary {
    background-color: #002C6C !important;
}

.gs1-bg-light {
    background-color: #f5f5f5 !important;
}

.text-gs1-primary {
    color: #002d6c !important;
}

.border-gs1-primary {
    border-color: #002d6c !important;
}

/* GS1 Font Family (Roboto) */
.font-gs1 {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Global Layout - Use Bootstrap flexbox utilities for layout */
body {
    background-color: #e9e9e9;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html, body {
    height: 100%;
}

/* Heading styles */
h1 {
    font-weight: 600;
}

/* Main container heading styles - GS1 dark blue */
main .h2,
main h2 {
    color: #002d6c;
}

/* Business Search Specific Styles */

/* Container query for business list - enables responsive layout based on container width */
#businessList {
    container-type: inline-size;
    container-name: business-list;
}

/* When container is small (<600px), force single column layout */
@container business-list (max-width: 600px) {
    #businessList > .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.business-card {
    border: 1px solid #ddd;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.business-card:hover {
    border-color: #002C6C;
    box-shadow: 0 2px 4px rgba(0, 44, 108, 0.1);
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.business-item-clickable {
    cursor: pointer;
}

/* Step indicator styles - ensure perfect circles and equal widths */
.step-item {
    flex: 1;
    max-width: 120px;
}

.step-item .badge {
    width: 32px;
    height: 32px;
    padding: 0 !important;
}

/* Stepper Component - Matches mockup design */
.stepper-wrapper {
    position: relative;
    border-radius: 0;
    padding: 1rem 1rem 0.5rem 1rem;
    margin: 0 auto;
}

/* Straight connector line */
.stepper-connector {
    position: absolute;
    top: 1.75rem;
    left: calc(100% / 14);
    right: calc(100% / 14);
    height: 2px;
    background-color: #adb5bd;
    z-index: 0;
}

/* Horizontal stepper layout */
.stepper-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.stepper-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    pointer-events: none;
    cursor: default;
    position: relative;
}

.stepper-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-bottom: 0;
}

/*overwrite mdb styles*/

.stepper-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 28px;
    border-radius: 50%;
    z-index: 2;
    position: relative;
    margin-bottom: 0.4rem;
    background-color: #e9e9e9 !important;
}

.stepper-head-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #6c757d;
    color: white;
    font-size: 0.8rem;
    font-weight: 400;
}

.stepper-head-text {
    font-size: 12px;
    color: #495057;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
}

/* Active step styling */
.stepper-step.stepper-active .stepper-head-inner {
    background-color: #002d6c;
    color: white;
}

.stepper-step.stepper-active .stepper-head-text {
    color: #002d6c;
    font-weight: 600;
}

/* Completed step styling */
.stepper-step.stepper-completed .stepper-head-inner {
    background-color: #28a745;
    color: white;
}

.stepper-step.stepper-completed .stepper-head-text {
    color: #495057;
    font-weight: 400;
}

/* Select Services Page Styles */
.service-option {
    padding: 0.75rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.service-option:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.service-option .form-check-input:checked~.service-label {
    color: #002C6C;
    font-weight: 500;
}

.service-label {
    margin-left: 0.5rem;
    margin-bottom: 0;
    cursor: pointer;
    transition: color 0.15s ease-in-out;
}

.locations-included-label {
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

/* Contact alert specific styling */
.contact-btn {
    min-width: 120px;
}

/* Turnover warning alert */
#turnoverWarning {
    border-left: 4px solid #ffc107;
}

/* Form validation improvements */
/* Fixed spacing to prevent layout shifts when validation messages appear */
.form-field-wrapper {
    margin-bottom: 0.6rem;
}

.invalid-feedback {
    display: block;
    min-height: 1.25rem;
    margin-top: 0.1rem;
    font-size: 0.875rem;
}

/* Override Bootstrap's default display:none for invalid-feedback */
.form-control~.invalid-feedback,
.form-select~.invalid-feedback {
    visibility: hidden;
}

.form-control.is-invalid~.invalid-feedback,
.form-select.is-invalid~.invalid-feedback {
    visibility: visible;
}

.form-control.is-invalid,
.form-control.is-valid {
    margin-bottom: 0;
}

/* Ensure consistent height for input and select elements */
.form-control,
.form-select {
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* MDB5 form-outline label positioning adjustment */
.form-outline .form-label {
    padding-top: 0.5rem !important;
}

/* Read-only form control - light background with subtle text */
.form-control-readonly {
    background-color: #fff !important;
    color: #adb5bd !important;
}

/* Global form-outline spacing for consistent vertical gaps between inputs */
.form-outline {
    margin-bottom: 1.9rem;
}

/* Override height for textarea elements */
textarea.form-control {
    height: auto;
}

/* Button enhancements */
.btn {
    text-transform: none;
}

.btn-primary {
    background-color: #002C6C;
    border-color: #002C6C;
}

.btn-primary:hover {
    background-color: #001f4d;
    border-color: #001f4d;
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 44, 108, 0.25);
}

/* Disabled state improvements */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-check-input:disabled~.service-label {
    opacity: 0.6;
    color: #6c757d;
}

/* v0.7: Service option disabled styling - visually greyed out */
.service-option:has(.form-check-input:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
}

.service-option:has(.form-check-input:disabled) span {
    color: #6c757d;
}

/* Step indicator for select services */
.step-progress {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Membership Selection Styles - v0.8 Mockup Layout */

/* Membership Cards Container */
.membership-cards-row {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* Membership Option Cards */
.membership-option {
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    padding: 1.5rem;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    flex: 0 1 400px;
    max-width: 400px;
}

.membership-option:hover {
    border-color: #adb5bd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Full Member Option */
.full-member-option {
    border-color: #002C6C;
}

.full-member-option.selected {
    background-color: #E0ECFC;
    border-color: #002C6C;
    box-shadow: 0 4px 16px rgba(0, 44, 108, 0.2);
}

/* Affiliate Option */
.affiliate-option {
    border-color: #dee2e6;
}

.affiliate-option:hover {
    border-color: #002C6C;
}

.affiliate-option.selected {
    background-color: #E0ECFC;
    border-color: #002C6C;
    box-shadow: 0 4px 16px rgba(0, 44, 108, 0.2);
}

/* Membership Header */
.membership-header {
    border-bottom: 1px solid #dee2e6;
    padding-left: 1rem;
    padding-right: 1rem;
}

.membership-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

/* Membership Price Display */
.membership-price {
    margin-bottom: 0.5rem;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
}

.price-period {
    font-size: 1rem;
    color: #666;
    font-weight: 400;
}

/* Membership Button */
.btn-membership {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    max-width: 280px;
}

/* Features List */
.membership-features {
    padding-top: 1rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    padding: 0.6rem 0;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.4;
}

.feature-item i {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 1rem;
}

.feature-item.feature-unavailable span {
    color: #999;
}

/* Mobile responsiveness */
@media (max-width: 767.98px) {
    .membership-cards-row {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .membership-option {
        padding: 1rem;
        border-radius: 12px;
        max-width: 100%;
        width: 100%;
    }

    .full-member-option,
    .affiliate-option {
        border-width: 2px;
    }

    .price-amount {
        font-size: 2rem;
    }

    .feature-item {
        font-size: 0.85rem;
    }

    .btn-membership {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Dropdown - Parent items bold */
.select-dropdown-container .select-option-group-label {
    font-weight: bold;
}

/* AddressFinder loading indicator */
.form-control.loading {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cstyle%3E@keyframes spin %7B to %7B transform: rotate(360deg) %7D %7D%3C/style%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='%23002d6c' stroke-width='2' stroke-dasharray='31.4 31.4' transform-origin='center'%3E%3CanimateTransform attributeName='transform' type='rotate' dur='1s' repeatCount='indefinite' from='0 12 12' to='360 12 12'/%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-block;
    transition: opacity 200ms ease-in;
}

/* Footer Styling - GS1 NZ Standard Footer */
.footer {
    margin-top: 0;
}

.footer .container {
    max-width: 900px;
}

.section-light-gray {
    background-color: #f4f4f4;
    padding: 1.25rem 0 1rem 0;
}

.footer-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
}

.footer-group {
    flex: 0 0 auto;
    min-width: 130px;
}

.footer-group-title {
    font-size: 1.125rem;
    font-weight: 300;
    color: #002d6c;
    margin-bottom: 0.5rem;
}

.footer-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-link-item {
    margin-bottom: 0.25rem;
}

.footer-link-item a {
    color: #018dbd;
    text-decoration: none;
    font-size: 15px;
    font-weight: normal;
    transition: color 0.2s ease;
}

.footer-link-item a:hover {
    color: #f26333;
    text-decoration: none;
}

.footer-group-social {
    text-align: left;
}

.footer-group-phone-link {
    display: inline-block;
    font-size: 1.25rem;
    font-weight: normal;
    color: #ff6633;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.footer-group-phone-link:hover {
    color: #cc4d1f;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.footer-social-icon {
    display: inline-block;
}

.footer-social-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: transparent;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.footer-social-icon-link:hover {
    background-color: transparent;
    color: white;
}

.footer-social-icon-link i {
    font-size: 0.875rem;
}

/* Footer responsive adjustments */
@media (max-width: 768px) {
    .footer-main {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-group {
        min-width: 100%;
    }

    .footer-group-phone-link {
        font-size: 1.125rem;
    }
}