/* --- ClassicProfessional Style for Namiti Contact Module --- */

:root {
    --holity-blue: #5F87D1;
    --holity-blue-hover: #4a6fb3;
    --zinc-50: #fafafa;
    --zinc-100: #f4f4f5;
    --zinc-200: #e4e4e7;
    --zinc-300: #d4d4d8;
    --zinc-400: #a1a1aa;
    --zinc-500: #71717a;
    --zinc-600: #52525b;
    --zinc-700: #3f3f46;
    --zinc-800: #27272a;
    --zinc-900: #18181b;
}

.contact-module-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0;
    font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.contact-page-shell {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

.contact-header-title {
    margin-bottom: 2rem;
    text-align: center;
}

.contact-header-title h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--zinc-800);
    margin-bottom: 0.5rem;
}

.contact-header-title p {
    color: var(--zinc-500);
    font-size: 0.875rem;
}

.contact-card {
    background-color: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 700px;
    width: 100%;
}

@media (min-width: 1024px) {
    .contact-card {
        flex-direction: row;
    }
}

/* --- Left Column: Info & Branding --- */
.contact-info-panel {
    background-color: var(--holity-blue);
    color: #ffffff;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .contact-info-panel {
        width: 40%;
        padding: 4rem;
    }
}

.pattern-circle {
    position: absolute;
    width: 16rem;
    height: 16rem;
    border-radius: 9999px;
    filter: blur(80px);
    opacity: 0.2;
}

.pattern-circle.top-right {
    top: 0;
    right: 0;
    background-color: #ffffff;
    transform: translate(50%, -50%);
}

.pattern-circle.bottom-left {
    bottom: 0;
    left: 0;
    background-color: var(--zinc-100);
    transform: translate(-50%, 50%);
}

.branding-content {
    position: relative;
    z-index: 10;
}

.branding-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.branding-divider {
    width: 3rem;
    height: 0.25rem;
    background-color: rgba(255, 255, 255, 0.3);
    margin-bottom: 2rem;
}

.branding-headline {
    font-size: 2.25rem;
    line-height: normal;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

@media (min-width: 1024px) {
    .branding-headline {
        font-size: 3rem;
    }
}

.branding-headline .highlight {
    font-weight: 600;
}

.branding-subtext {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    max-width: 28rem;
    font-size: 1.125rem;
}

.branding-subtext p {
    margin-bottom: 1.25rem;
}

.branding-subtext p:last-child {
    margin-bottom: 0;
}

.info-contact-group {
    position: relative;
    z-index: 10;
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item-box {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-icon-wrapper {
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-radius: 2px;
}

.info-item-box:hover .info-icon-wrapper {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.info-details-box p.info-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.info-details-box a {
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 500;
    text-decoration: none;
}

/* Icons for Info Panel */
.icon {
    width: 1.25rem;
    height: 1.25rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon.phone-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.81 12.81 0 0 0 .63 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.63A2 2 0 0 1 22 16.92z'%3E%3C/path%3E%3C/svg%3E");
}

.icon.email-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'%3E%3C/path%3E%3Cpolyline points='22,6 12,13 2,6'%3E%3C/polyline%3E%3C/svg%3E");
}

/* --- Right Column: Form --- */
.contact-form-panel {
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

@media (min-width: 1024px) {
    .contact-form-panel {
        width: 60%;
        padding: 4rem;
    }
}

.contact-form-custom .contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    border: none !important;
    padding: 0 !important;
}

@media (min-width: 768px) {
    .contact-form-custom .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.contact-form-custom .field--full {
    grid-column: 1 / -1;
}

/* Label Refinement */
.contact-form-custom .label {
    display: block !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    color: var(--zinc-500) !important;
    margin-bottom: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* Control & Icon Wrapper */
.contact-form-custom .control {
    position: relative;
    width: 100%;
}

.contact-form-custom .input-with-icon {
    position: relative;
    width: 100%;
}

.contact-form-custom .input-with-icon .material-input {
    padding-left: 48px !important;
    margin: 0 !important;
}

.contact-form-custom .field-icon {
    position: absolute;
    left: 16px;
    top: 16px;
    /* Centered at approximately half of input height (14px padding + ~14px text) */
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--zinc-400);
    z-index: 10;
    pointer-events: none;
    width: 18px;
    height: 18px;
}

/* Input Styles */
.contact-form-custom .material-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    border: 1px solid var(--zinc-200);
    background-color: #ffffff;
    transition: all 0.3s;
    outline: none;
    border-radius: 2px;
    color: var(--zinc-800);
}

.contact-form-custom .material-input:focus {
    border-color: var(--holity-blue);
    background-color: var(--zinc-50);
}

.contact-form-custom textarea.material-input {
    min-height: 120px;
    resize: vertical;
}

.contact-form-custom .material-input::placeholder {
    color: var(--zinc-300);
    opacity: 1;
    /* Firefox */
}

.contact-form-custom .material-input::-ms-input-placeholder {
    color: var(--zinc-300);
}

/* Submit Button */
.contact-form-custom .actions-toolbar {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.contact-form-custom .action.submit {
    width: 100%;
    background-color: var(--holity-blue) !important;
    color: #ffffff !important;
    padding: 16px 32px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s;
    border: none;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (min-width: 768px) {
    .contact-form-custom .action.submit {
        width: auto;
        min-width: 200px;
    }
}

.contact-form-custom .action.submit:hover {
    background-color: var(--holity-blue-hover) !important;
    transform: translateY(-1px);
}

/* --- Product Search Refinements --- */
#product_sku {
    width: 100%;
}

.selected-products {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    width: 100%;
}

.product-chip {
    padding: 8px 14px;
    background-color: var(--holity-blue);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.remove-chip {
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0.8;
}

.remove-chip:hover {
    opacity: 1;
}

/* Input Group for Search */
.product-search-group {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.product-search-controls {
    display: flex;
    gap: 10px;
}

.product-search-group .product-search-input {
    padding-left: 48px !important;
    padding-right: 40px !important;
    height: 48px !important;
    box-sizing: border-box !important;
}

/* Standalone Search Button */
.product-search-btn-standalone {
    background-color: var(--holity-blue) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0 24px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border-radius: 2px !important;
    cursor: pointer;
    transition: all 0.3s;
    height: 48px !important;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box !important;
}

.product-search-btn-standalone:hover {
    background-color: var(--holity-blue-hover) !important;
    transform: translateY(-1px);
}

.product-search-btn-standalone.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.product-search-btn-standalone.is-loading span {
    visibility: hidden;
}

.product-search-btn-standalone.is-loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    top: calc(50% - 10px);
    left: calc(50% - 10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: product-search-spin 0.6s linear infinite;
}

@keyframes product-search-spin {
    to {
        transform: rotate(360deg);
    }
}

.product-search-group .field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--zinc-400);
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--zinc-100);
    color: var(--zinc-500);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    z-index: 10;
    transition: all 0.2s;
}

.product-search-clear:hover {
    background-color: var(--zinc-200);
    color: var(--zinc-800);
}

/* Autocomplete result styling */
.ui-autocomplete {
    background: #ffffff !important;
    border: 1px solid var(--zinc-300) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
    z-index: 9999 !important;
    padding: 0 !important;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 4px;
}

.ui-menu-item {
    border-bottom: 1px solid var(--zinc-100);
}

.ui-menu-item:last-child {
    border-bottom: none;
}

.ui-menu-item a {
    display: flex !important;
    align-items: center;
    gap: 15px;
    padding: 12px 20px !important;
    color: var(--zinc-800) !important;
    font-size: 14px;
    text-decoration: none !important;
    transition: background 0.2s;
}

.ui-menu-item a:hover,
.ui-menu-item a.ui-state-focus {
    background-color: var(--zinc-50) !important;
    color: var(--holity-blue) !important;
    border: none !important;
    margin: 0 !important;
}

.product-result {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.product-result-image-wrapper {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--zinc-200);
    border-radius: 4px;
    padding: 4px;
}

.product-result-image {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
}

.product-result-info {
    display: flex;
    flex-direction: column;
}

.product-result-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.product-result-sku {
    font-size: 12px;
    color: var(--zinc-500);
}

/* Validation */
.contact-form-custom .mage-error {
    color: #ef4444;
    font-size: 11px;
    margin-top: 6px;
    font-weight: 500;
}

.contact-form-custom .material-input.mage-error {
    color: var(--zinc-800) !important;
    border-color: #ef4444 !important;
}

.field.required .label::after {
    content: " *";
    color: #ef4444;
    font-weight: bold;
}

/* --- Success Page Specific Styles --- */
.success-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 500px;
}

.success-content {
    max-width: 450px;
    padding: 2rem;
}

.success-icon-wrapper {
    color: var(--holity-blue);
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.success-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--zinc-800);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.success-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--zinc-600);
    margin-bottom: 32px;
}

.namiti-btn-back {
    background-color: var(--holity-blue);
    color: #ffffff !important;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    transition: background-color 0.2s;
}

.namiti-btn-back:hover {
    background-color: var(--holity-blue-hover);
    text-decoration: none !important;
}

.namiti-btn-back span {
    color: #ffffff !important;
}

/* Fix for container width on some themes */
.contact-module-container .contact-card {
    width: 100%;
    margin: 0 auto;
}