/* =========================================================
   ASTROFLOW TRANSITS – TERMÉKOLDALI ŰRLAP
   ========================================================= */

.aft-transits-form-wrapper,
.aft-transits-form-wrapper * {
    box-sizing: border-box;
}

.aft-transits-form-wrapper {
    width: 100%;
    margin: 20px 0 24px;
    padding: 25px;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(31, 35, 48, 0.07);
    color: #171717;
}

.aft-form-title-box {
    margin-bottom: 22px;
    padding: 16px 12px;
    background: #f8f7fc;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(31, 35, 48, 0.06);
}

.aft-form-title-box h2 {
    margin: 0 !important;
    padding: 0 !important;
    color: #111111;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
}

.aft-form-intro {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 0 0 23px;
    color: #5c5c66;
    font-size: 14px;
    line-height: 1.55;
}

.aft-lock-icon {
    flex: 0 0 auto;
    font-size: 13px;
    line-height: 1.5;
}

.aft-period-fieldset {
    min-width: 0;
    margin: 0 0 28px;
    padding: 0;
    border: 0;
}

.aft-period-fieldset legend,
.aft-transits-form-wrapper .aft-field > label {
    display: block;
    width: 100%;
    margin: 0 0 9px;
    padding: 0;
    color: #171717;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.aft-period-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

.aft-period-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 85px;
    padding: 18px 10px 14px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    appearance: none;
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(31, 35, 48, 0.04);
    color: #171717;
    cursor: pointer;
    font: inherit;
    text-align: center;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.aft-period-card:hover {
    border-color: #a88aff;
    transform: translateY(-1px);
}

.aft-period-card:focus-visible {
    outline: 3px solid rgba(121, 76, 255, 0.22);
    outline-offset: 2px;
}

.aft-period-card.is-selected {
    background: #f7f3ff;
    border: 2px solid #794cff;
    box-shadow: 0 5px 12px rgba(121, 76, 255, 0.16);
}

.aft-period-name {
    color: #171717;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
}

.aft-period-price {
    color: #66616d;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    white-space: nowrap;
}

.aft-popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    padding: 3px 10px;
    transform: translateX(-50%);
    background: #794cff;
    border-radius: 999px;
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.4;
    white-space: nowrap;
}

.aft-field {
    margin: 0 0 18px;
}

.aft-place-field {
    margin-bottom: 0;
}

.aft-transits-form-wrapper input[type="text"],
.aft-transits-form-wrapper select {
    width: 100%;
    min-height: 47px;
    margin: 0;
    padding: 11px 15px !important;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    box-shadow: none;
    color: #202020;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.35;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.aft-transits-form-wrapper input[type="text"]::placeholder {
    color: #888888;
    opacity: 1;
}

.aft-transits-form-wrapper input[type="text"]:focus,
.aft-transits-form-wrapper select:focus {
    background: #ffffff;
    border-color: #794cff;
    box-shadow: 0 0 0 3px rgba(121, 76, 255, 0.13);
    outline: none;
}

.aft-date-row,
.aft-time-row {
    display: grid;
    gap: 8px;
}

.aft-date-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.aft-time-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.aft-select-field {
    min-width: 0;
}

.aft-sublabel {
    display: block;
    margin: 0 0 5px;
    color: #8a8a8f;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.2;
}

.aft-form-error {
    display: none;
    margin: 12px 0 0;
    color: #b42318;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.aft-form-error.is-visible {
    display: block;
}

/* A saját időszakkártyák kiváltják a WooCommerce alap variációs legördülőjét. */
form.aft-transits-cart table.variations,
form.aft-transits-cart .reset_variations {
    display: none !important;
}

/* A WooCommerce variáció ára továbbra is látható marad. */
form.aft-transits-cart .single_variation_wrap {
    margin-top: 0;
}

form.aft-transits-cart .woocommerce-variation-price {
    margin: 0 0 14px;
}

form.aft-transits-cart .woocommerce-variation-price .price {
    color: #9b8100;
    font-size: 23px;
    font-weight: 400;
}

/* Csak ezen a terméken írjuk felül a WooCommerce gombot. */
form.aft-transits-cart .single_add_to_cart_button {
    width: 100% !important;
    min-height: 52px;
    padding: 14px 24px !important;
    background: linear-gradient(135deg, #e6bbe9, #c08ce0) !important;
    border: 0 !important;
    border-radius: 14px !important;
    box-shadow: none;
    color: #ffffff !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

form.aft-transits-cart .single_add_to_cart_button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(133, 32, 186, 0.22);
}

form.aft-transits-cart .single_add_to_cart_button:disabled,
form.aft-transits-cart .single_add_to_cart_button.disabled {
    background: #dddddd !important;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
}

@media (max-width: 600px) {
    .aft-transits-form-wrapper {
        padding: 20px;
    }

    .aft-period-grid {
        gap: 8px;
    }

    .aft-period-card {
        min-height: 82px;
        padding-right: 6px;
        padding-left: 6px;
    }

    .aft-period-name {
        font-size: 14px;
    }

    .aft-period-price {
        font-size: 12px;
    }

    .aft-popular-badge {
        padding-right: 7px;
        padding-left: 7px;
        font-size: 8px;
    }
}

@media (max-width: 410px) {
    .aft-period-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .aft-period-card {
        min-height: 76px;
    }
}