/* ==========================================================================
   Form Input Icons (.input-with-icon)
   Shared across contact, trial, and checkout forms
   ========================================================================== */

.input-with-icon {
    position: relative;
}

.input-with-icon > .ph {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.125rem;
    pointer-events: none;
    z-index: 1;
    transition: color 0.2s ease;
}

.input-with-icon input,
.input-with-icon select {
    padding-left: 42px !important;
}

/* Icon color change on focus */
.input-with-icon:has(input:focus) > .ph,
.input-with-icon:has(select:focus) > .ph,
.input-with-icon:has(textarea:focus) > .ph {
    color: var(--accent-orange);
}

/* Textarea icon positioning (top-left) */
.input-with-icon.textarea-icon > .ph {
    top: 16px;
    transform: none;
}

.input-with-icon.textarea-icon textarea {
    padding-left: 42px !important;
}

/* Select dropdown arrow adjustment */
.input-with-icon select {
    background-position: right 14px center !important;
}

/* Forms with labels - icon positioned relative to input, not the whole container */
.trial-form .input-with-icon,
.trial-form-wrapper .input-with-icon,
.contact-form .input-with-icon {
    display: flex;
    flex-direction: column;
}

.trial-form .input-with-icon > label,
.trial-form-wrapper .input-with-icon > label,
.contact-form .input-with-icon > label {
    position: relative;
    margin-bottom: 8px;
}

.trial-form .input-with-icon > .ph,
.trial-form-wrapper .input-with-icon > .ph,
.contact-form .input-with-icon > .ph {
    top: auto;
    bottom: 14px;
    transform: none;
}

/* Trial form icon styles */
.trial-form .input-with-icon > .ph,
.trial-form-wrapper .input-with-icon > .ph {
    left: 16px;
}

.trial-form .input-with-icon input,
.trial-form .input-with-icon select {
    padding-left: 46px !important;
}

/* Contact form icon styles */
.contact-form .input-with-icon > .ph {
    left: 14px;
}

.contact-form .input-with-icon input,
.contact-form .input-with-icon select,
.contact-form .input-with-icon textarea {
    padding-left: 42px !important;
}

/* Contact form textarea icon */
.contact-form .input-with-icon.textarea-icon > .ph {
    bottom: auto;
    top: calc(100% - 120px);
}

/* ==========================================================================
   Adult Content Toggle
   ========================================================================== */

.adult-content-toggle {
    margin-top: 16px;
    margin-bottom: 16px;
}

.adult-content-toggle .toggle-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.adult-content-toggle .toggle-container:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.adult-content-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.adult-content-toggle .toggle-switch {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-top: 2px;
}

.adult-content-toggle .toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.adult-content-toggle input[type="checkbox"]:checked + .toggle-switch {
    background: var(--accent-orange);
}

.adult-content-toggle input[type="checkbox"]:checked + .toggle-switch::after {
    transform: translateX(20px);
    background: white;
}

.adult-content-toggle .toggle-label-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.adult-content-toggle .toggle-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.adult-content-toggle .toggle-description {
    font-size: 12px;
    color: var(--text-muted);
}


/* Focus state for accessibility */
.adult-content-toggle input[type="checkbox"]:focus + .toggle-switch {
    box-shadow: 0 0 0 2px rgba(var(--accent-orange-rgb), 0.3);
}

/* Checkout page specific adjustments */
.checkout-form-v2 .adult-content-toggle {
    margin-top: 12px;
}

.checkout-form-v2 .adult-content-toggle .toggle-container {
    background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   MAC Address Field Styles
   ========================================================================== */

.mac-address-field {
    position: relative;
}

/* Keep MAC icon aligned with input (not helper text) */
.mac-address-field.input-with-icon > .ph {
    top: 24px;
    transform: translateY(-50%);
    font-size: 1rem;
}

/* Trial form has label above input, so icon needs a lower anchor */
.trial-form .mac-address-field.input-with-icon > .ph {
    top: 52px;
    bottom: auto;
    transform: translateY(-50%);
}

.mac-address-field input {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mac-address-field .form-helper {
    display: block;
    margin-top: 8px;
    padding-left: 2px;
    font-size: 11px;
    color: var(--text-muted);
}

/* Validation states */
.mac-address-field input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.mac-address-field input:valid:not(:placeholder-shown) {
    border-color: #22c55e;
}

/* Trial page MAC address field */
.trial-form .mac-address-field {
    margin-bottom: 16px;
}

.trial-form .mac-address-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.trial-form .mac-address-field .form-helper {
    color: var(--text-muted);
    font-size: 12px;
}

/* ==========================================================================
   Form Section Dividers
   ========================================================================== */

.form-section-divider {
    display: flex;
    align-items: center;
    margin: 24px 0 16px;
    gap: 12px;
}

.form-section-divider::before,
.form-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.form-section-divider span {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Trial form specific adjustments */
.trial-form .form-section-divider {
    margin: 20px 0 12px;
}

.trial-form .form-section-divider:first-of-type {
    margin-top: 8px;
}

/* Trial form toggle alignment fix */
.trial-form .form-row-inline {
    display: flex;
    align-items: stretch;
}

.trial-form .form-row-inline .form-group {
    flex: 1;
    margin-bottom: 0;
    display: flex;
    align-items: stretch;
}

.trial-form .form-row-inline .form-group select {
    flex: 1;
    height: 48px;
}

.trial-form .form-row-inline .adult-toggle-compact {
    flex: 1;
    margin-bottom: 0;
    display: flex;
    align-items: stretch;
}

.trial-form .form-row-inline .adult-toggle-compact .toggle-inline {
    flex: 1;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure toggle text is centered with the switch */
.trial-form .toggle-inline .toggle-text {
    overflow: visible;
    text-overflow: clip;
    line-height: 1;
}

/* ==========================================================================
   Two-Column Form Row
   ========================================================================== */

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 768px) {
    .form-row-2col { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Form Section Blocks (checkout + trial shared)
   Section cards give visual rhythm and grouping
   ========================================================================== */

.form-section {
    margin-bottom: 28px;
}

.form-section h3,
.form-group > label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

/* Shared input base for new flows */
.form-section input[type="text"],
.form-section input[type="email"],
.checkout-form-wrapper-v2 .form-section input[type="text"],
.checkout-form-wrapper-v2 .form-section input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-heading);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-section input:focus,
.checkout-form-wrapper-v2 .form-section input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(var(--accent-orange-rgb), 0.12);
}

.form-section input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* ==========================================================================
   Device Pills — Compact rounded chips
   ========================================================================== */

.device-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.device-pill {
    padding: 9px 16px;
    border-radius: 100px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-primary);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-body);
    line-height: 1.3;
    white-space: nowrap;
    user-select: none;
}

.device-pill:hover {
    border-color: var(--accent-orange);
    color: var(--text-heading);
}

.device-pill.selected {
    border-color: var(--accent-orange);
    background: var(--accent-orange);
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--accent-orange-rgb), 0.25);
}

/* ==========================================================================
   Messenger CTA Buttons — Bold, unmissable
   ========================================================================== */

.messenger-cta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 28px;
}

.btn-messenger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.15s;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.btn-telegram {
    background: linear-gradient(135deg, #2AABEE 0%, #0088cc 100%);
}

.btn-messenger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-messenger:active {
    transform: translateY(0);
}

.btn-messenger:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    filter: grayscale(0.3);
}

.btn-messenger:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-messenger .ph {
    font-size: 1.25rem;
}

@media (max-width: 768px) {
    .messenger-cta-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Form Validation Inline
   ========================================================================== */

.form-validation {
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #ef4444;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-top: 12px;
}

/* ==========================================================================
   Trial Duration Badge
   ========================================================================== */

.trial-duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 100px;
    background: rgba(var(--accent-orange-rgb), 0.08);
    border: 1px solid rgba(var(--accent-orange-rgb), 0.15);
    color: var(--accent-orange);
    font-weight: 600;
    font-size: 0.875rem;
    margin-top: 16px;
}

.trial-duration-badge .ph { font-size: 1.125rem; }

/* ==========================================================================
   Price Display — Prominent total
   ========================================================================== */

.price-display {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 20px 24px;
    border-radius: 14px;
    background: rgba(var(--accent-orange-rgb), 0.05);
    border: 1.5px solid rgba(var(--accent-orange-rgb), 0.12);
    margin-top: 20px;
}

.price-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.price-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.02em;
    line-height: 1;
}

.price-period {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   Duration Pills — Cards with price + badge
   ========================================================================== */

.duration-pills {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

@media (max-width: 768px) {
    .duration-pills {
        grid-template-columns: repeat(2, 1fr);
    }
}

.duration-pill {
    position: relative;
    padding: 14px 12px 12px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-primary);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    text-align: center;
    user-select: none;
}

.duration-pill:hover {
    border-color: rgba(var(--accent-orange-rgb), 0.5);
}

.duration-pill.selected {
    border-color: var(--accent-orange);
    background: rgba(var(--accent-orange-rgb), 0.06);
    box-shadow: 0 0 0 1px var(--accent-orange);
}

.duration-pill-label {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-heading);
    line-height: 1.2;
}

.duration-pill-price {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 3px;
    font-weight: 500;
}

.duration-pill.selected .duration-pill-price {
    color: var(--accent-orange);
    font-weight: 600;
}

.duration-pill-badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--accent-orange);
    color: #fff;
    padding: 2px 7px;
    border-radius: 100px;
    margin-top: 6px;
}

/* ==========================================================================
   Connections Pills — Number chips
   ========================================================================== */

.connections-pills {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.conn-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-primary);
    cursor: pointer;
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-body);
    transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
    user-select: none;
}

.conn-pill:hover {
    border-color: rgba(var(--accent-orange-rgb), 0.5);
    color: var(--text-heading);
}

.conn-pill.selected {
    border-color: var(--accent-orange);
    background: var(--accent-orange);
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--accent-orange-rgb), 0.25);
}

@media (max-width: 480px) {
    .connections-pills {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ==========================================================================
   Payment Method Pills — Selection cards
   ========================================================================== */

.payment-pills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.payment-pill {
    padding: 16px 12px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-primary);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    text-align: center;
    user-select: none;
}

.payment-pill:hover {
    border-color: rgba(var(--accent-orange-rgb), 0.5);
}

.payment-pill.selected {
    border-color: var(--accent-orange);
    background: rgba(var(--accent-orange-rgb), 0.06);
    box-shadow: 0 0 0 1px var(--accent-orange);
}

.payment-pill-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.payment-pill.selected .payment-pill-icon {
    color: var(--accent-orange);
}

.payment-pill-label {
    font-weight: 700;
    font-size: 0.8125rem;
    color: var(--text-heading);
    line-height: 1.3;
}

.payment-pill-discount {
    display: inline-block;
    font-size: 0.6875rem;
    color: #10b981;
    font-weight: 700;
    margin-top: 4px;
    background: rgba(16, 185, 129, 0.08);
    padding: 1px 6px;
    border-radius: 100px;
}

/* ==========================================================================
   Checkout V2 Form Wrapper — Section spacing
   ========================================================================== */

.checkout-form-wrapper-v2 .form-section {
    margin-bottom: 28px;
}

.checkout-form-wrapper-v2 .form-section h3 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.checkout-form-wrapper-v2 .input-with-icon {
    position: relative;
}

.checkout-form-wrapper-v2 .input-with-icon > .ph {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.125rem;
    pointer-events: none;
    transition: color 0.15s;
}

.checkout-form-wrapper-v2 .input-with-icon input {
    padding-left: 42px !important;
}

.checkout-form-wrapper-v2 .input-with-icon:has(input:focus) > .ph {
    color: var(--accent-orange);
}

/* ==========================================================================
   Plan Selector Cards (shared — trial + checkout)
   ========================================================================== */

.plan-selector-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.plan-card {
    position: relative;
    display: block;
    padding: 16px;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.plan-card input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

.plan-card:hover {
    border-color: rgba(var(--accent-orange-rgb), 0.5);
}

.plan-card.selected {
    border-color: var(--accent-orange);
    background: rgba(var(--accent-orange-rgb), 0.06);
    box-shadow: 0 0 0 1px var(--accent-orange);
}

.plan-card-content { display: flex; flex-direction: column; gap: 4px; }
.plan-card-name { font-size: 1rem; font-weight: 700; color: var(--text-heading); }
.plan-card-price { font-size: 0.8125rem; color: var(--text-muted); font-weight: 500; }

.plan-card-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--accent-orange);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 100px;
    margin-top: 4px;
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ==========================================================================
   Adult Toggle — Compact in both flows
   ========================================================================== */

.trial-form-wrapper .adult-toggle-compact,
.checkout-form-wrapper-v2 .adult-toggle-compact {
    margin: 20px 0 4px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
}
