/* ========================================================
   ABC — Modern Beauty Clinic Form (Gold Theme)
   ======================================================== */

:root {
    /* Brand */
    --abc-brand:            #f6ca1f;   /* bright yellow — accents, borders */
    --abc-brand-soft:       #fdf5d3;   /* very light yellow background */
    --abc-brand-softest:    #fffbe8;   /* even lighter, page tint */

    /* Buttons — darker gold so white text is readable */
    --abc-btn:              #b8940f;
    --abc-btn-hover:        #9a7a08;
    --abc-btn-active:       #7f6506;

    /* Text */
    --abc-text:             #111111;   /* black */
    --abc-text-soft:        #6b6b6b;   /* grey */
    --abc-text-muted:       #999999;

    /* Surfaces */
    --abc-bg:               #ffffff;   /* white */
    --abc-bg-soft:          #fafafa;
    --abc-border:           #ececec;

    /* Status */
    --abc-bg-warn:          #fff8e1;
    --abc-bg-err:           #ffebee;
    --abc-bg-ok:            #e8f5e9;
    --abc-bg-info:          #e3f2fd;

    --abc-radius:           14px;
    --abc-radius-sm:        10px;
    --abc-shadow:           0 10px 40px rgba(0, 0, 0, .06);
    --abc-shadow-hover:     0 14px 50px rgba(184, 148, 15, .18);
}

/* ========================================================
   Container & Card
   ======================================================== */
.abc-container {
    max-width: 760px;
    margin: 30px auto;
    padding: 0 16px;
    font-family: "Vazirmatn", "IRANSans", Tahoma, system-ui, -apple-system, sans-serif;
    direction: rtl;
    color: var(--abc-text);
    line-height: 1.7;
}
.abc-container * { box-sizing: border-box; }

.abc-card {
    background: var(--abc-bg);
    border-radius: var(--abc-radius);
    box-shadow: var(--abc-shadow);
    padding: 30px 28px;
    border: 1px solid var(--abc-border);
    position: relative;
    overflow: hidden;
}
.abc-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--abc-brand);
}

/* ========================================================
   Header
   ======================================================== */
.abc-header {
    text-align: center;
    margin-bottom: 22px;
}
.abc-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 6px;
    color: var(--abc-text);
}
.abc-subtitle {
    font-size: 13px;
    color: var(--abc-text-soft);
    margin: 0;
}

.abc-select-label {
    text-align: center;
    font-size: 14px;
    color: var(--abc-text-soft);
    margin: 0 0 12px;
    font-weight: 600;
}

/* ========================================================
   Tabs
   ======================================================== */
.abc-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: var(--abc-brand-softest);
    padding: 6px;
    border-radius: var(--abc-radius-sm);
    margin-bottom: 24px;
    border: 1px solid var(--abc-brand-soft);
}
.abc-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: var(--abc-text-soft);
    font-family: inherit;
    transition: all .25s ease;
}
.abc-tab:hover { color: var(--abc-text); }
.abc-tab.active {
    background: var(--abc-brand);
    color: var(--abc-text);
    box-shadow: 0 2px 10px rgba(246, 202, 31, .35);
}
.abc-tab-icon { font-size: 18px; }

.abc-tab-content { display: none; animation: abc-fade-in .3s ease; }
.abc-tab-content.active { display: block; }

@keyframes abc-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========================================================
   Fields
   ======================================================== */
.abc-field { margin-bottom: 20px; }
.abc-field > label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 14px;
    color: var(--abc-text);
}
.abc-req { color: var(--abc-btn); margin-left: 2px; }

/* ========================================================
   File input (custom)
   ======================================================== */
.abc-file-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--abc-bg-soft);
    border: 2px dashed #d8d8d8;
    border-radius: var(--abc-radius-sm);
    cursor: pointer;
    transition: all .25s ease;
    position: relative;
}
.abc-file-wrap:hover {
    border-color: var(--abc-brand);
    background: var(--abc-brand-softest);
    transform: translateY(-1px);
}
.abc-file-wrap input[type="file"] {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}
.abc-file-icon { font-size: 22px; }
.abc-file-name {
    font-size: 14px;
    color: var(--abc-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    text-align: left;
    direction: ltr;
}
.abc-file-wrap.has-file {
    border-color: var(--abc-brand);
    border-style: solid;
    background: #fff;
}
.abc-file-wrap.has-file .abc-file-name {
    color: var(--abc-text);
    font-weight: 700;
}

/* ========================================================
   Eyebrow samples
   ======================================================== */
.abc-eyebrow-samples {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
@media (max-width: 480px) {
    .abc-eyebrow-samples { grid-template-columns: repeat(2, 1fr); }
}
.abc-sample {
    position: relative;
    cursor: pointer;
    border-radius: var(--abc-radius-sm);
    overflow: hidden;
    border: 3px solid transparent;
    transition: all .25s ease;
    aspect-ratio: 1 / 1;
    background: var(--abc-bg-soft);
}
.abc-sample img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.abc-sample input { display: none; }
.abc-sample:hover {
    transform: translateY(-2px);
    border-color: var(--abc-brand-soft);
}
.abc-sample input:checked ~ img { transform: scale(1.02); }
.abc-sample input:checked ~ .abc-sample-check { opacity: 1; transform: scale(1); }
.abc-sample:has(input:checked) {
    border-color: var(--abc-brand);
    box-shadow: 0 0 0 4px rgba(246, 202, 31, .25);
}
.abc-sample-check {
    position: absolute;
    top: 8px; right: 8px;
    width: 26px; height: 26px;
    background: var(--abc-brand);
    color: var(--abc-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    opacity: 0;
    transform: scale(.6);
    transition: all .25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* ========================================================
   Text inputs
   ======================================================== */
.abc-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--abc-bg-soft);
    border: 2px solid var(--abc-border);
    border-radius: var(--abc-radius-sm);
    transition: all .25s ease;
    overflow: hidden;
}
.abc-input-wrap:focus-within {
    border-color: var(--abc-brand);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(246, 202, 31, .2);
}
.abc-input-icon {
    padding: 0 14px;
    font-size: 18px;
    color: var(--abc-btn);
}
.abc-input-wrap input {
    flex: 1;
    padding: 14px 0;
    border: none;
    background: transparent;
    font-size: 16px;
    font-family: inherit;
    color: var(--abc-text);
    direction: ltr;
    text-align: left;
    outline: none;
}
.abc-input-wrap input::placeholder { color: #bbb; }

/* ========================================================
   Terms
   ======================================================== */
.abc-terms {
    background: var(--abc-brand-softest);
    border-radius: var(--abc-radius-sm);
    padding: 16px 18px;
    border: 1px solid var(--abc-brand-soft);
}
.abc-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px !important;
}
.abc-terms-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.abc-custom-check {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
    margin-top: 1px;
}
.abc-custom-check::after {
    content: '✓';
    color: var(--abc-text);
    font-size: 14px;
    font-weight: 800;
    opacity: 0;
    transform: scale(.5);
    transition: all .2s ease;
}
.abc-terms-label input:checked ~ .abc-custom-check {
    background: var(--abc-brand);
    border-color: var(--abc-brand);
}
.abc-terms-label input:checked ~ .abc-custom-check::after {
    opacity: 1;
    transform: scale(1);
}
.abc-terms-list {
    margin: 8px 0 0;
    padding-right: 22px;
    font-size: 12.5px;
    color: var(--abc-text-soft);
    line-height: 1.9;
}
.abc-terms-list li { margin-bottom: 2px; }

/* ========================================================
   Buttons — gold background, white text
   ======================================================== */
.abc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--abc-radius-sm);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    background: var(--abc-btn);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(184, 148, 15, .35);
    transition: all .25s ease;
    position: relative;
    overflow: hidden;
}
.abc-btn:hover:not(:disabled) {
    background: var(--abc-btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(184, 148, 15, .45);
}
.abc-btn:active:not(:disabled) {
    background: var(--abc-btn-active);
    transform: translateY(0);
}
.abc-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}
.abc-btn-text { position: relative; z-index: 2; }
.abc-btn-arrow {
    font-size: 18px;
    transition: transform .25s ease;
}
.abc-btn:hover .abc-btn-arrow { transform: translateX(-4px); }

/* Ghost / secondary button */
.abc-btn-ghost {
    background: #ffffff;
    color: var(--abc-btn);
    border: 2px solid var(--abc-btn);
    box-shadow: none;
}
.abc-btn-ghost:hover:not(:disabled) {
    background: var(--abc-brand-soft);
    border-color: var(--abc-btn);
    color: var(--abc-btn-active);
    box-shadow: none;
}

.abc-submit {
    width: 100%;
    margin-top: 8px;
    padding: 16px;
    font-size: 16px;
}

.abc-actions {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

/* ========================================================
   Verify step
   ======================================================== */
.abc-verify-icon {
    text-align: center;
    font-size: 48px;
    margin-bottom: 10px;
}
.abc-verify-text {
    text-align: center;
    font-size: 15px;
    color: var(--abc-text-soft);
    margin-bottom: 20px;
}
.abc-phone-display {
    color: var(--abc-text);
    direction: ltr;
    display: inline-block;
    font-weight: 800;
}
.abc-code-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}
.abc-code {
    width: 220px;
    padding: 16px;
    text-align: center;
    font-size: 28px;
    letter-spacing: 12px;
    font-weight: 700;
    border: 2px solid var(--abc-border);
    border-radius: var(--abc-radius-sm);
    background: var(--abc-bg-soft);
    transition: all .25s ease;
    font-family: inherit;
    color: var(--abc-text);
}
.abc-code:focus {
    outline: none;
    border-color: var(--abc-brand);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(246, 202, 31, .2);
}
.abc-resend-wrap {
    text-align: center;
    margin-top: 18px;
}
.abc-resend {
    background: transparent;
    color: var(--abc-btn);
    border: 1.5px solid var(--abc-btn);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    transition: all .25s ease;
}
.abc-resend:not(:disabled):hover {
    background: var(--abc-brand);
    border-color: var(--abc-brand);
    color: var(--abc-text);
}
.abc-resend:disabled {
    color: #bbb;
    border-color: #ddd;
    cursor: not-allowed;
}

/* ========================================================
   Processing / Loading
   ======================================================== */
.abc-step-processing { padding: 20px 10px; }
.abc-loader { text-align: center; }

.abc-spinner {
    width: 110px;
    height: 110px;
    margin: 10px auto 24px;
    position: relative;
}
.abc-spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}
.abc-spinner-ring:nth-child(1) {
    border-top-color: var(--abc-brand);
    border-right-color: var(--abc-brand);
    animation: abc-spin 1.4s linear infinite;
}
.abc-spinner-ring:nth-child(2) {
    inset: 12px;
    border-bottom-color: var(--abc-btn);
    border-left-color: var(--abc-btn);
    animation: abc-spin 2s linear infinite reverse;
}
.abc-spinner-core {
    position: absolute;
    inset: 30px;
    background: var(--abc-brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--abc-text);
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 8px 24px rgba(246, 202, 31, .5);
    animation: abc-pulse 1.6s ease-in-out infinite;
}
@keyframes abc-spin {
    to { transform: rotate(360deg); }
}
@keyframes abc-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.abc-loader-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--abc-text);
    margin: 0 0 8px;
}
.abc-loader-hint {
    font-size: 13.5px;
    color: var(--abc-text-soft);
    margin: 0 auto 22px;
    max-width: 420px;
    line-height: 1.9;
}

.abc-progress {
    height: 8px;
    background: var(--abc-brand-soft);
    border-radius: 10px;
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto 18px;
}
.abc-progress-fill {
    height: 100%;
    width: 0;
    background: var(--abc-brand);
    border-radius: 10px;
    transition: width .6s ease;
    position: relative;
}
.abc-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
    animation: abc-shine 1.6s linear infinite;
}
@keyframes abc-shine {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}

.abc-loader-tip {
    font-size: 12.5px;
    color: var(--abc-text-soft);
    margin: 0;
    padding: 10px 14px;
    background: var(--abc-brand-softest);
    border-radius: 8px;
    display: inline-block;
}

/* ========================================================
   Result step
   ======================================================== */
.abc-result-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--abc-text);
    text-align: center;
    margin: 20px 0 12px;
}
.abc-result-text {
    background: var(--abc-brand-softest);
    padding: 14px 18px;
    border-radius: var(--abc-radius-sm);
    font-size: 14px;
    color: var(--abc-text);
    line-height: 1.9;
    white-space: pre-wrap;
    border-right: 3px solid var(--abc-brand);
    margin-bottom: 18px;
}
.abc-result-images { text-align: center; margin: 10px 0 20px; }
.abc-result-image-wrap {
    display: inline-block;
    margin: 10px;
    text-align: center;
    max-width: 100%;
}
.abc-result-image-thumb {
    max-width: 100%;
    max-height: 320px;
    border-radius: 12px;
    cursor: zoom-in;
    border: 2px solid var(--abc-border);
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    transition: transform .25s ease;
    display: block;
}
.abc-result-image-thumb:hover { transform: scale(1.02); }

.abc-show-image-btn {
    margin-top: 10px;
    background: var(--abc-btn);
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: 24px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(184, 148, 15, .35);
    transition: all .25s ease;
}
.abc-show-image-btn:hover {
    background: var(--abc-btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(184, 148, 15, .45);
}

.abc-result-link-box {
    text-align: center;
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--abc-brand-softest);
    border-radius: var(--abc-radius-sm);
    font-size: 13.5px;
    color: var(--abc-text-soft);
    border: 1px solid var(--abc-brand-soft);
}
.abc-result-direct-link {
    color: var(--abc-btn);
    font-weight: 700;
    text-decoration: underline;
}
.abc-result-direct-link:hover { color: var(--abc-btn-active); }

.abc-result-footer {
    text-align: center;
    font-size: 12.5px;
    color: var(--abc-text-soft);
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px dashed var(--abc-border);
}

/* ========================================================
   Notice boxes
   ======================================================== */
.abc-notice {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--abc-radius-sm);
    margin-bottom: 18px;
    font-size: 13.5px;
    line-height: 1.9;
    animation: abc-fade-in .4s ease;
}
.abc-notice-warning {
    background: var(--abc-bg-warn);
    border-right: 4px solid var(--abc-brand);
    color: #5d4a00;
}
.abc-notice-icon {
    font-size: 26px;
    flex-shrink: 0;
    line-height: 1;
}

/* ========================================================
   Message box
   ======================================================== */
.abc-message {
    margin-top: 18px;
    display: none;
    animation: abc-fade-in .3s ease;
}
.abc-msg-success,
.abc-msg-error,
.abc-msg-info {
    padding: 14px 18px;
    border-radius: var(--abc-radius-sm);
    font-size: 14px;
    line-height: 1.7;
    display: flex;
    align-items: center;
    gap: 10px;
}
.abc-msg-success::before { content: '✅'; font-size: 20px; }
.abc-msg-error::before   { content: '⚠️'; font-size: 20px; }
.abc-msg-info::before    { content: 'ℹ️'; font-size: 20px; }

.abc-msg-success {
    background: var(--abc-bg-ok);
    color: #1b5e20;
    border-right: 4px solid #43a047;
}
.abc-msg-error {
    background: var(--abc-bg-err);
    color: #b71c1c;
    border-right: 4px solid #e53935;
}
.abc-msg-info {
    background: var(--abc-bg-info);
    color: #0d47a1;
    border-right: 4px solid #1976d2;
}

/* ========================================================
   Modal
   ======================================================== */
.abc-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .88);
    z-index: 999999;
    padding: 20px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    backdrop-filter: blur(4px);
}
.abc-modal-backdrop.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: abc-fade-in .25s ease;
}
.abc-modal-inner {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    background: #1a1a1a;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: abc-zoom-in .3s ease;
}
@keyframes abc-zoom-in {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1); }
}
.abc-modal-image {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    border-radius: 10px;
    object-fit: contain;
}
.abc-modal-close {
    position: absolute;
    top: -14px;
    left: -14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--abc-brand);
    color: var(--abc-text);
    border: none;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: all .2s ease;
}
.abc-modal-close:hover {
    background: var(--abc-btn);
    color: #fff;
    transform: rotate(90deg);
}
.abc-modal-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.abc-modal-actions a,
.abc-modal-actions button {
    background: var(--abc-btn);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13.5px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: background .2s;
}
.abc-modal-actions a:hover,
.abc-modal-actions button:hover {
    background: var(--abc-btn-hover);
    color: #fff;
}

/* ========================================================
   Responsive
   ======================================================== */
@media (max-width: 600px) {
    .abc-container { margin: 15px auto; }
    .abc-card { padding: 22px 18px; }
    .abc-title { font-size: 19px; }
    .abc-modal-image { max-height: 68vh; }
    .abc-modal-close { top: -10px; left: -10px; width: 34px; height: 34px; font-size: 20px; }
    .abc-actions { grid-template-columns: 1fr; }
    .abc-show-image-btn { padding: 10px 18px; font-size: 13px; }
}