/**
 * 嘉南羊乳 - 客戶確認頁面共用樣式
 * 參考 forms.kngoatmilk.com 風格
 */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: #000;
    letter-spacing: 1px;
    line-height: 1.5;
    min-height: 100vh;
    background-image: url('https://forms.kngoatmilk.com/images/bg.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Header */
#header_s {
    position: relative;
    width: 100%;
    padding: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#header_s > img {
    width: 100%;
    height: auto;
    display: block;
}
#header_s .logo {
    margin-top: -1px;
    background: #f6f4f3;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}
#header_s .logo img {
    width: 100px;
    height: auto;
}

/* Content Head - 雲朵標題 */
.content_head {
    background-color: #f6f4f3;
    margin-bottom: 0;
    padding-bottom: 1px;
    width: 100%;
}
.content_head #title {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    height: 100px;
    color: #fff;
    background-image: url('https://forms.kngoatmilk.com/images/title.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    padding-top: 30px;
    margin-top: -1px;
}

/* Wave Divider - 波浪分隔線 */
.h_bottom {
    height: 105px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}
.h_bottom img {
    width: 100%;
    height: auto;
}
@media (max-width: 500px) {
    .h_bottom {
        height: 75px;
    }
    .h_bottom img {
        margin-left: -130%;
        width: auto;
        height: 100%;
    }
}

/* Form Main Container */
#form_main {
    text-align: left;
    margin: 0 auto;
    max-width: 400px;
    width: 100%;
    position: relative;
    min-height: calc(100vh - 500px);
    text-align: center;
    padding: 10px 15px 30px;
}
#form_main .title {
    text-align: left;
    font-size: 16px;
    color: #FBF107;
    margin: 20px 0 10px;
}

/* Result Pages */
.result_page {
    text-align: center;
    padding: 40px 20px;
    color: #fff;
}
.result_icon {
    font-size: 64px;
    margin-bottom: 20px;
}
.result_title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #FBF107;
}
.result_title.error {
    color: #ff6b6b;
}
.result_desc {
    font-size: 14px;
    color: #fff;
    line-height: 1.8;
}
.error_message {
    background: rgba(255,107,107,0.2);
    color: #ff6b6b;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 14px;
}

/* Info Card */
.info_card {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    text-align: left;
}
.info_card .card_title {
    color: #FBF107;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
}
.info_card .card_text {
    color: #fff;
    font-size: 13px;
    line-height: 1.8;
}
.info_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #fff;
}
.info_row:last-child {
    border-bottom: none;
}
.info_label {
    color: #c9cccf;
    font-size: 13px;
}
.info_value {
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 1px;
}
.info_value.highlight {
    color: #FBF107;
}
.info_value.amount {
    font-size: 20px;
    color: #FBF107;
}

/* Notice Card */
.notice_card {
    background: rgba(255,200,100,0.15);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    text-align: left;
}
.notice_card .notice_title {
    color: #FBF107;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
}
.notice_card .notice_text {
    color: #fff;
    font-size: 13px;
    line-height: 1.8;
}

/* Buttons */
.phone_link {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 30px;
    background: #FBF107;
    color: #2677db;
    text-decoration: none;
    border-radius: 40px;
    font-weight: bold;
    font-size: 16px;
}
.copy_btn {
    background: rgba(251,241,7,0.2);
    color: #FBF107;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
}
.copy_btn:active {
    background: rgba(251,241,7,0.3);
}

/* Footer */
#footer {
    width: 100%;
    color: #6c6c6c;
    font-size: 14px;
    text-align: center;
    overflow: hidden;
    margin-top: 20px;
}
#footer > img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: -1px;
}
#footer .footer_content {
    background: #f6f4f3;
    padding: 15px 0 20px;
}
#footer .footer_top {
    margin-bottom: 10px;
}
#footer .footer_top a {
    color: #2677db;
    text-decoration: none;
    margin: 0 10px;
}
#footer .footer_bottom {
    font-size: 12px;
    color: #b2b2b2;
}

/* Step Group - 步驟指示器 (4步) */
.step_group {
    display: flex;
    justify-content: space-around;
    position: relative;
    padding: 10px 5px;
    margin: 20px auto;
    color: #c9cccf;
    max-width: 450px;
}
.step_group .line {
    top: 35%;
    position: absolute;
    height: 2px;
    width: calc(100% - 60px);
    background: #c9cccf;
    left: 30px;
    z-index: 0;
}
.step_group .line .bar {
    width: 0;
    height: 100%;
    background: #2677db;
    transition: width 0.3s;
}
.step_group .line .bar.step1 { width: 0%; }
.step_group .line .bar.step2 { width: 33%; }
.step_group .line .bar.step3 { width: 66%; }
.step_group .line .bar.step4 { width: 100%; }
.step_group .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 65px;
    position: relative;
    background: #f6f4f3;
    padding: 0 3px;
    z-index: 1;
}
.step_group .step.active {
    color: #2677db;
}
.step_group .step.active .num,
.step_group .step.completed .num {
    border-color: #2677db;
    background: #2677db;
    color: #fff;
}
.step_group .step .num {
    font-weight: bold;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #c9cccf;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f6f4f3;
}
.step_group .step .text {
    text-align: center;
    position: absolute;
    font-size: 11px;
    bottom: 0;
    white-space: nowrap;
}

/* Form Styles */
.form-group {
    margin: 15px 0;
}
.input_block {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.input_title {
    color: #fff;
    font-size: 14px;
    width: 85px;
    padding: 0 5px;
    text-align: left;
}
.input_title.required::after {
    content: '*';
    color: #FBF107;
    margin-left: 2px;
}
input, select, textarea {
    width: calc(100% - 95px);
    height: 35px;
    background: #f4f2f0;
    border: none;
    border-radius: 30px;
    padding: 0 15px;
    font-size: 14px;
    font-family: inherit;
}
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    line-height: 35px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 35px;
    cursor: pointer;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    background: #fff;
    border: 2px solid #2677db;
}
input.readonly {
    background: #e0e0e0;
    color: #666;
}
textarea {
    width: 100%;
    height: auto;
    min-height: 60px;
    padding: 10px 15px;
    border-radius: 15px;
    resize: vertical;
}
.help-block {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 5px;
    padding-left: 95px;
}

/* Offer Group (Plan Cards) */
#offer_group {
    width: 100%;
}
#offer_group .offer_item {
    display: block;
    position: relative;
    padding: 12px 15px;
    border: 1px solid #fff;
    border-radius: 10px;
    margin: 10px 0;
    cursor: pointer;
    transition: 0.3s;
    text-align: left;
    background: rgba(255,255,255,0.1);
}
#offer_group .offer_item:hover {
    border-color: #2677db;
    background: rgba(255,255,255,0.15);
}
#offer_group .offer_item.active {
    border-color: #FBF107;
    border-width: 2px;
    background: rgba(251,241,7,0.1);
}
#offer_group .offer_item .plan_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#offer_group .offer_item .plan_name {
    font-size: 15px;
    color: #fff;
    font-weight: 500;
}
#offer_group .offer_item .plan_desc {
    font-size: 12px;
    color: #fff;
}
#offer_group .offer_item .plan_gift {
    font-size: 12px;
    color: #FBF107;
    margin-top: 4px;
}
#offer_group .offer_item .plan_price {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 6px;
}
#offer_group .offer_item .plan_price .amount {
    font-size: 18px;
    font-weight: 500;
    color: #FBF107;
}
#offer_group .offer_item input { display: none; }

/* Taste Selection */
.taste_row {
    display: flex;
    align-items: center;
    margin: 15px 0;
    gap: 10px;
}
.taste_day {
    color: #fff;
    font-size: 14px;
    width: 85px;
    padding: 0 5px;
    text-align: left;
}
.taste_select {
    flex: 1;
    width: auto;
    height: 35px;
    border-radius: 20px;
}

/* Payment Methods */
.payment_methods {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}
.payment_method {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 10px;
    border: 1px solid #fff;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    background: rgba(255,255,255,0.1);
    text-align: center;
}
.payment_method:hover {
    border-color: #2677db;
    background: rgba(255,255,255,0.15);
}
.payment_method.active {
    border-color: #FBF107;
    border-width: 2px;
    background: rgba(251,241,7,0.1);
}
.payment_method input { display: none; }
.payment_method .pay_icon {
    font-size: 28px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.payment_method .pay_name {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}

/* Buttons */
button {
    width: 100%;
    height: 45px;
    border: none;
    color: #2677db;
    background-color: #FBF107;
    border-radius: 40px;
    cursor: pointer;
    margin: 10px 0;
    font-size: 16px;
    font-weight: bold;
    transition: 0.3s;
}
button:hover {
    background: #e96223;
    color: #fff;
}
button.secondary {
    background: #6c6c6c;
    color: #fff;
}
button.secondary:hover {
    background: #555;
}
button.danger {
    background: #e53935;
    color: #fff;
}
button.danger:hover {
    background: #c62828;
}

/* Button Group */
.btn_group {
    padding: 20px 0;
    display: flex;
    gap: 12px;
}
.btn_group button {
    flex: 2;
    margin: 0;
}
.btn_group form {
    flex: 1;
    margin: 0;
}
.btn_group form button {
    flex: none;
    width: 100%;
}
.btn_group button.secondary {
    flex: 1;
}
.btn_group.single button {
    flex: none;
    width: 100%;
}

/* Other Options */
.other_options {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}
.other_options .title {
    font-size: 14px;
    margin-bottom: 10px;
}
.option_btn {
    display: inline-block;
    padding: 10px 16px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid #fff;
    border-radius: 25px;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s;
}
.option_btn:hover {
    background: rgba(255,255,255,0.25);
}
button.option_btn {
    width: auto;
    height: auto;
    margin: 0;
}

/* Alert */
.alert {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 14px;
}
.alert-error {
    background: rgba(229, 57, 53, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(229, 57, 53, 0.3);
}

/* Order Summary */
.order_summary {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}
.summary_row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    font-size: 14px;
}
.summary_row:last-child {
    border-bottom: none;
}
.summary_row .label {
    color: #c9cccf;
}
.summary_row.total {
    font-size: 18px;
    font-weight: bold;
    color: #FBF107;
}
.taste_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.taste_table th {
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 6px 4px;
    text-align: center;
    font-weight: 500;
}
.taste_table td {
    background: rgba(255,255,255,0.05);
    color: #fff;
    padding: 6px 4px;
    text-align: center;
}
.taste_table td.skipped {
    color: #999;
}

/* Date Hint */
.date_hint {
    font-size: 14px;
    color: #FBF107;
    margin-top: 10px;
    padding: 10px 15px;
    background: rgba(251, 241, 7, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(251, 241, 7, 0.3);
    margin-left: 85px;
}
.date_hint.can_advance {
    background: rgba(233, 98, 35, 0.2);
    color: #ffab91;
}
.date_hint button {
    height: 28px;
    padding: 0 12px;
    font-size: 12px;
    margin: 5px 5px 0 0;
    width: auto;
}

/* Loading */
.loading {
    position: fixed;
    background-color: rgba(255, 255, 255, 0.75);
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    display: none;
}
.spinner {
    position: absolute;
    top: calc(50% - 20px);
    left: calc(50% - 25px);
    width: 50px;
    height: 40px;
}
.spinner > div {
    background-color: #2699fb;
    height: 100%;
    width: 6px;
    display: inline-block;
    animation: sk-stretchdelay 1.2s infinite ease-in-out;
}
.spinner .rect2 { animation-delay: -1.1s; }
.spinner .rect3 { animation-delay: -1s; }
.spinner .rect4 { animation-delay: -0.9s; }
.spinner .rect5 { animation-delay: -0.8s; }
@keyframes sk-stretchdelay {
    0%, 40%, 100% { transform: scaleY(0.4); }
    20% { transform: scaleY(1); }
}

/* ===== 多瓶口味選擇 ===== */

/* 多瓶口味選擇行 */
.taste_row_multi {
    display: flex;
    align-items: flex-start;
    margin: 12px 0;
    gap: 0;
}
.taste_row_multi .taste_day {
    color: #fff;
    font-size: 14px;
    width: 85px;
    padding: 0 5px;
    text-align: left;
    flex-shrink: 0;
    line-height: 35px;
}
.taste_row_multi .taste_selects {
    width: calc(100% - 85px);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.taste_row_multi .taste_select {
    width: 100%;
    height: 35px;
    border-radius: 30px;
    font-size: 14px;
    padding: 0 15px;
    background: #f4f2f0;
    border: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    line-height: 35px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 35px;
}
/* 加價口味選項樣式 */
.taste_select option.premium {
    color: #e96223;
}

/* 星期之間的分隔線（瓶數 > 1 時顯示） */
.taste_divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 8px 0;
}

/* 禁用按鈕 */
button:disabled {
    background: #999;
    color: #666;
    cursor: not-allowed;
}
button:disabled:hover {
    background: #999;
    color: #666;
}
