/* Seller register page — PC base + mobile/web (< xl) optimizations */

section.shop-register {
    background: linear-gradient(206deg, rgb(255, 115, 55) -20%, rgb(238, 77, 45) 93%);
    background-image: var(--sr-bg-image), linear-gradient(206deg, rgb(255, 115, 55) -20%, rgb(238, 77, 45) 93%);
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: contain;
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
}

section.shop-register .shop-register-row {
    justify-content: flex-end;
}

section.shop-register .shop-register-form-col {
    margin-left: auto;
    margin-right: 0;
}

section.shop-register .form-control,
section.shop-register .custom-select {
    border-radius: 8px;
}

section.shop-register .sr-register__card-head {
    display: flex;
    align-items: center;
    gap: 0;
}

section.shop-register .sr-register__step {
    display: none;
}

section.shop-register .sr-register__hero {
    display: none;
}

section.shop-register .sr-register__submit {
    text-align: right;
}

section.shop-register .sr-register__upload {
    position: relative;
}

section.shop-register .sr-register__upload-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

section.shop-register .sr-register__upload-trigger {
    display: flex;
    align-items: stretch;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    min-height: 44px;
}

section.shop-register .sr-register__upload-trigger.disabled {
    opacity: 0.7;
    pointer-events: none;
}

section.shop-register .sr-register__upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    background: #f3f4f6;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    border-right: 1px solid #e5e7eb;
}

section.shop-register .sr-register__upload-name {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    padding: 0 12px;
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

section.shop-register .sr-register__upload-preview {
    display: none;
    margin-top: 8px;
    border: 1px solid #edf0f5;
    border-radius: 8px;
    overflow: hidden;
    background: #fafbfc;
}

section.shop-register .sr-register__upload-preview.has-image {
    display: block;
}

section.shop-register .sr-register__upload-preview img {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    background: #fff;
}

@media (max-width: 1199.98px) {
    section.shop-register {
        background-image: linear-gradient(165deg, #ff7337 0%, #ee4d2d 55%, #e84530 100%);
        background-size: cover;
        background-position: center;
        padding-top: 0;
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    }

    section.shop-register .container {
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    section.shop-register .shop-register-row {
        justify-content: center;
        margin-left: 0;
        margin-right: 0;
    }

    section.shop-register .shop-register-form-col {
        margin-left: auto;
        margin-right: auto;
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Mobile hero */
    section.shop-register .sr-register__hero {
        display: block;
        text-align: center;
        color: #fff;
        padding: 20px 16px 16px;
    }

    section.shop-register .sr-register__hero-title {
        font-size: 20px;
        font-weight: 700;
        margin: 0 0 6px;
        line-height: 1.3;
    }

    section.shop-register .sr-register__hero-desc {
        font-size: 13px;
        margin: 0;
        opacity: 0.9;
        line-height: 1.5;
    }

    /* Form cards */
    section.shop-register .sr-register__card {
        border-radius: 14px !important;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
        margin-bottom: 12px !important;
    }

    section.shop-register .sr-register__card-head {
        gap: 10px;
        padding: 14px 16px !important;
        background: #fafbfc;
        border-bottom: 1px solid #edf0f5 !important;
        font-size: 14px;
    }

    section.shop-register .sr-register__step {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 24px;
        height: 24px;
        border-radius: 8px;
        background: var(--primary, #e62d04);
        color: #fff;
        font-size: 12px;
        font-weight: 700;
        line-height: 1;
    }

    section.shop-register .sr-register__card-body {
        padding: 16px !important;
    }

    section.shop-register .form-group {
        margin-bottom: 14px;
    }

    section.shop-register .form-group label {
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 6px;
        color: #444;
    }

    section.shop-register .form-control,
    section.shop-register .custom-select {
        height: 44px;
        font-size: 14px;
    }

    section.shop-register textarea.form-control {
        height: auto;
    }

    section.shop-register .input-group[data-toggle="aizuploader"] {
        flex-wrap: wrap;
    }

    section.shop-register .input-group[data-toggle="aizuploader"] .input-group-prepend {
        width: 100%;
        margin-bottom: 0;
    }

    section.shop-register .input-group[data-toggle="aizuploader"] .input-group-text {
        width: 100%;
        justify-content: center;
        border-radius: 8px 8px 0 0 !important;
        padding: 10px;
        font-size: 13px;
    }

    section.shop-register .input-group[data-toggle="aizuploader"] .form-control.file-amount {
        width: 100%;
        border-radius: 0 0 8px 8px !important;
        font-size: 12px;
        min-height: 40px;
    }

    section.shop-register .file-preview.box.sm {
        margin-top: 8px;
    }

    /* reCAPTCHA */
    section.shop-register .sr-register__captcha {
        justify-content: center;
        overflow-x: auto;
        margin-bottom: 12px;
    }

    section.shop-register .sr-register__captcha .g-recaptcha {
        transform-origin: center top;
    }

    /* Submit */
    section.shop-register .sr-register__submit {
        text-align: center;
        padding: 4px 0 8px;
    }

    section.shop-register .sr-register__submit .btn {
        width: 100%;
        height: 48px;
        font-size: 15px;
        font-weight: 700;
        border-radius: 10px;
        box-shadow: 0 4px 14px rgba(230, 45, 4, 0.35);
    }

    /* Apply modal */
    #apply-seller-modal .modal-dialog {
        margin: 12px;
        max-width: calc(100% - 24px);
    }

    #apply-seller-modal .modal-content {
        border-radius: 14px;
        overflow: hidden;
    }

    #apply-seller-modal .modal-footer {
        flex-direction: column-reverse;
        gap: 8px;
    }

    #apply-seller-modal .modal-footer .btn {
        width: 100%;
        margin: 0 !important;
        padding: 10px;
    }
}

@media (max-width: 360px) {
    section.shop-register .sr-register__captcha .g-recaptcha {
        transform: scale(0.88);
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    section.shop-register .shop-register-form-col {
        max-width: 520px;
    }
}

section.shop-register .sr-register__agreement {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

section.shop-register .sr-register__agreement .aiz-checkbox {
    align-items: flex-start;
}

section.shop-register .sr-register__agreement-text {
    line-height: 1.6;
    color: #4b5563;
}

section.shop-register .sr-register__agreement-link {
    color: #e8621a;
    font-weight: 600;
    text-decoration: none;
}

section.shop-register .sr-register__agreement-link:hover {
    color: #cf4f0d;
    text-decoration: underline;
}

.seller-contract-modal .modal-body {
    max-height: calc(100vh - 220px);
    -webkit-overflow-scrolling: touch;
}

.seller-contract-modal .modal-dialog {
    margin: 0.75rem auto;
    max-width: calc(100vw - 1.5rem);
}

.seller-contract-modal__content {
    border: 0;
    overflow: hidden;
}

.seller-contract-modal__handle {
    display: none;
}

.seller-contract-modal__header {
    align-items: flex-start;
    border-bottom: 1px solid #f0f2f7;
    padding: 16px 18px;
}

.seller-contract-modal__heading {
    flex: 1;
    min-width: 0;
    padding-right: 12px;
}

.seller-contract-modal__subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: #8b95a7;
    line-height: 1.5;
}

.seller-contract-modal__close {
    margin: -4px -6px 0 0;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    opacity: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.seller-contract-modal__body {
    padding: 14px 16px 16px;
    background: #f7f8fb;
}

.seller-contract-panel {
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.seller-contract-panel:last-child {
    margin-bottom: 0;
}

.seller-contract-panel__label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.seller-contract-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.seller-contract-panel__hint {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #9aa3b2;
}

.seller-contract-clear-btn {
    flex-shrink: 0;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    border: 0;
}

.seller-contract-body {
    max-height: 320px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid #eef0f7;
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    line-height: 1.7;
    color: #4b5563;
}

.seller-contract-body p {
    margin-bottom: 0.65rem;
}

.seller-contract-signature {
    touch-action: none;
}

.seller-contract-signature-box {
    position: relative;
    border: 1px dashed #d5dbe7;
    border-radius: 10px;
    background: #fcfdff;
    overflow: hidden;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.seller-contract-signature-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c4cad4;
    font-size: 14px;
    pointer-events: none;
}

.seller-contract-signature-box.is-signed .seller-contract-signature-placeholder {
    display: none;
}

.seller-contract-signature-box canvas {
    display: block;
    width: 100%;
    height: 160px;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    cursor: crosshair;
    position: relative;
    z-index: 1;
}

.seller-contract-modal__footer {
    border-top: 1px solid #edf0f5;
    background: #fff;
    padding: 12px 16px;
    gap: 10px;
}

.seller-contract-btn-cancel,
.seller-contract-btn-confirm {
    border-radius: 10px;
    min-height: 44px;
    font-weight: 600;
}

@media (max-width: 767.98px) {
    body.seller-contract-modal-open {
        overflow: hidden;
    }

    body.seller-contract-modal-open .aiz-mobile-bottom-nav {
        display: none !important;
    }

    .seller-entry-contract-modal-wrap {
        z-index: 1060;
    }

    .seller-entry-contract-modal-wrap .modal-dialog {
        display: flex;
        align-items: flex-end;
        min-height: calc(100% - 0.5rem);
        margin: 0 auto;
        max-width: 100%;
        width: 100%;
    }

    .seller-contract-modal__content {
        width: 100%;
        max-height: min(92vh, 780px);
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.18);
        display: flex;
        flex-direction: column;
    }

    .seller-contract-modal__handle {
        display: block;
        width: 42px;
        height: 4px;
        margin: 10px auto 0;
        border-radius: 999px;
        background: #d8dee8;
        flex-shrink: 0;
    }

    .seller-contract-modal__header {
        background: linear-gradient(180deg, #fff7f4 0%, #ffffff 100%);
        border-bottom-color: #f3e8e3;
        padding-top: 10px;
    }

    .seller-contract-modal__header .modal-title {
        font-size: 16px;
        font-weight: 700;
        color: #1f2937;
    }

    .seller-contract-modal__body {
        flex: 1 1 auto;
        overflow-y: auto;
        padding: 12px 14px 14px;
    }

    .seller-contract-body {
        max-height: 34vh;
        font-size: 13px;
    }

    .seller-contract-signature-box canvas {
        height: 132px;
    }

    .seller-contract-modal__footer {
        flex-direction: column-reverse;
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
    }

    .seller-contract-btn-cancel,
    .seller-contract-btn-confirm {
        width: 100%;
        margin: 0;
    }

    .seller-contract-btn-confirm {
        background: linear-gradient(135deg, #ff7337 0%, #ee4d2d 100%);
        border: 0;
        box-shadow: 0 8px 18px rgba(238, 77, 45, 0.24);
    }
}
