/* ==========================================================================
   TicketHelp Order Configurator Stylesheet
   Loaded in <head> for zero-CLS, zero-FOUC, instant stable layout on page refresh.
   ========================================================================== */

/* Order Configurator Responsive Grid */
.order-config-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.order-step-card {
    padding: 25px;
    box-sizing: border-box;
}

.order-domain-inputs-box {
    padding: 20px;
    box-sizing: border-box;
}

/* Radio Option Cards (Step 1) - scoped transitions to avoid layout resizing/scaling on load */
.order-domain-opt {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.order-domain-opt:hover {
    border-color: #cbd5e1;
}

.order-domain-opt input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--theme-green);
}

.order-domain-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.order-transfer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: stretch;
}

.domain-text-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.domain-prefix {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
    user-select: none;
    line-height: 1;
    z-index: 2;
}

.domain-prefix-sub {
    font-size: 13px;
}

.order-domain-input {
    width: 100%;
    height: 48px;
    padding-left: 60px;
    padding-right: 14px;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    font-size: 15px;
    color: #1e293b;
    background: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s ease;
}

.order-domain-input:focus {
    border-color: var(--theme-green);
    box-shadow: 0 0 0 3px rgba(113, 178, 56, 0.15);
}

.order-domain-input-full {
    padding-left: 14px;
}

.order-domain-input-icon {
    padding-left: 44px;
}

.order-domain-input-sub {
    padding-left: 88px;
}

.order-subdomain-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.subdomain-suffix {
    font-weight: 700;
    color: #333;
    font-size: 14px;
    padding: 0 16px;
    background: #f1f5f9;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    height: 48px;
    box-sizing: border-box;
}

.tld-combo {
    position: relative;
    padding: 0 !important;
    cursor: pointer;
    height: 48px;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    background: #fff;
    box-sizing: border-box;
    width: 180px;
    flex-shrink: 0;
}

.tld-combo-toggle {
    height: 100%;
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 14px;
    font-size: 13.5px;
    font-weight: 700;
    color: #333;
    box-sizing: border-box;
}

.tld-combo-toggle i {
    font-size: 11px;
    color: #71b238;
    transition: transform .2s;
}

.tld-combo.open .tld-combo-toggle i {
    transform: rotate(180deg);
}

.tld-combo-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    width: 250px;
    z-index: 60;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
    overflow: hidden;
}

.tld-combo.open .tld-combo-panel {
    display: block;
    animation: tcIn .16s ease-out;
}

@keyframes tcIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

.tld-combo-search {
    position: relative;
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

.tld-combo-search i {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 13px;
}

.tld-combo-search input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 8px 12px 8px 30px;
    font-size: 13px;
    color: #333;
    outline: none;
    background: #fff;
    box-sizing: border-box;
}

.tld-combo-search input:focus {
    border-color: #71b238;
    box-shadow: 0 0 0 3px rgba(113, 178, 56, .15);
}

.tld-combo-list {
    list-style: none;
    margin: 0;
    padding: 4px;
    max-height: 220px;
    overflow-y: auto;
}

.tld-combo-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
}

.tld-combo-list li .tc-ext {
    font-weight: 700;
}

.tld-combo-list li .tc-price {
    font-size: 12px;
    font-weight: 600;
    color: #5d982b;
}

.tld-combo-list li:hover, .tld-combo-list li.active {
    background: #f0f9e8;
}

.tld-combo-list li.selected {
    background: #71b238;
    color: #fff;
}

.tld-combo-list li.selected .tc-price {
    color: #eaffd6;
}

.tld-combo-empty {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px;
    font-size: 13px;
    color: #9a3412;
    background: #fff7ed;
}

.order-domain-check-btn {
    height: 48px;
    background: var(--theme-green, #71b238);
    color: #fff;
    font-weight: 700;
    font-size: 13.5px;
    padding: 0 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    transition: background 0.15s ease;
    flex-shrink: 0;
}
.order-domain-check-btn:hover {
    background: #5d982b;
}
.order-domain-check-btn:active {
    transform: scale(0.98);
}
.order-domain-check-btn:disabled {
    background: #94a3b8 !important;
    cursor: not-allowed !important;
}

.domain-feedback-card {
    border-radius: 6px;
    padding: 13px 15px;
    font-size: 13px;
    line-height: 1.45;
}
.domain-feedback-card.loading {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}
.domain-feedback-card.available {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}
.domain-feedback-card.unavailable {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}
.domain-feedback-card.invalid {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}
.btn-domain-quick {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease;
}
.btn-domain-quick:hover {
    background: #b91c1c;
}
.btn-domain-quick-alt {
    background: #fff;
    color: #333;
    border: 1px solid #d1d5db;
}
.btn-domain-quick-alt:hover {
    background: #f8fafc;
}

.order-cycles-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 14px;
    width: 100%;
}

.order-cycles-grid > label {
    flex: 0 1 240px;
    max-width: 280px;
    min-width: 160px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.order-cycles-grid > label input[type="radio"] {
    display: block;
    margin: 0 auto 6px auto;
    width: 18px;
    height: 18px;
    accent-color: var(--theme-green);
    cursor: pointer;
}

.order-summary-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: sticky;
    top: 20px;
    box-sizing: border-box;
}

/* Tablet & Mobile Breakpoints */
@media (max-width: 991px) {
    .order-config-grid {
        grid-template-columns: 1fr !important;
        gap: 25px;
    }
    .order-summary-card {
        position: static;
        margin-top: 10px;
    }
}

@media (max-width: 640px) {
    .order-step-card {
        padding: 18px 14px;
    }
    .order-domain-inputs-box {
        padding: 14px 10px;
    }
    .order-domain-row,
    .order-transfer-grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .domain-text-wrap {
        width: 100%;
    }
    .order-domain-input {
        font-size: 16px; /* Prevents auto-zoom on iOS */
    }
    .order-domain-check-btn {
        width: 100%;
        min-height: 48px;
        font-size: 15px;
    }
    .tld-combo {
        width: 100%;
    }
    .tld-combo-panel {
        width: 100%;
        left: 0;
        right: 0;
    }
    .order-subdomain-row {
        flex-direction: column;
        gap: 8px;
    }
    .subdomain-suffix {
        width: 100%;
    }
    .order-cycles-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        width: 100%;
    }
    .order-cycles-grid > label {
        flex: 1 1 200px;
        max-width: 280px;
        width: 100%;
        margin: 0 auto;
    }
    .order-domain-opt {
        padding: 12px 10px;
        gap: 10px;
    }
}
