/*
 * 마사지엠 프로모션 게시판 스킨
 */

.promo-board-list,
.promo-write,
.promo-view {
    width: min(100% - 30px, 1120px);
    margin: 34px auto 80px;
    font-family: 'Noto Sans KR', sans-serif;
}

.promo-board-head,
.promo-write-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    padding: 30px;
    border-radius: 22px;
    background: linear-gradient(135deg, #fff1f2, #fff);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.promo-board-head span,
.promo-write-head span {
    color: #e62d36;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.promo-board-head h1,
.promo-write-head h1 {
    margin: 6px 0 0;
    font-size: 31px;
    letter-spacing: -0.045em;
}

.promo-board-head p,
.promo-write-head p {
    margin: 9px 0 0;
    color: #747983;
}

.promo-board-btn,
.promo-board-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 14px;
    border: 1px solid #e0e3e8;
    border-radius: 11px;
    background: #fff;
    color: #34383f;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.promo-board-btn--primary {
    border-color: #e62d36;
    background: #e62d36;
    color: #fff;
}

.promo-board-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.promo-board-tabs a {
    padding: 9px 13px;
    border-radius: 999px;
    background: #f4f5f7;
    color: #5e646d;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.promo-board-table-wrap {
    overflow-x: auto;
    border: 1px solid #eceef2;
    border-radius: 18px;
    background: #fff;
}

.promo-board-table {
    width: 100%;
    min-width: 840px;
    border-collapse: collapse;
}

.promo-board-table th,
.promo-board-table td {
    padding: 15px 14px;
    border-bottom: 1px solid #f0f1f3;
    text-align: left;
    font-size: 13px;
}

.promo-board-table th {
    background: #f8f9fb;
    color: #60666f;
    font-weight: 800;
}

.promo-board-subject a {
    color: #1c1f24;
    font-weight: 800;
    text-decoration: none;
}

.promo-board-category {
    padding: 5px 8px;
    border-radius: 999px;
    background: #fff1f2;
    color: #e62d36;
    font-size: 11px;
    font-weight: 900;
}

.promo-board-empty {
    padding: 60px 20px !important;
    color: #92979f;
    text-align: center !important;
}

.promo-board-actions {
    display: flex;
    gap: 7px;
    margin-top: 12px;
}

.promo-board-actions button {
    padding: 9px 12px;
    border: 1px solid #e0e3e8;
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
}

.promo-board-pages {
    margin-top: 24px;
    text-align: center;
}

/* Write */
.promo-write-head {
    display: block;
}

.promo-form-card {
    padding: 26px;
    border: 1px solid #eceef2;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.055);
}

.promo-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.promo-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.promo-field--wide {
    grid-column: span 2;
}

.promo-field > span,
.promo-editor > span,
.promo-upload > span {
    color: #555b64;
    font-size: 12px;
    font-weight: 800;
}

.promo-field b,
.promo-editor b {
    color: #e62d36;
}

.promo-field input,
.promo-field select {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid #dfe2e7;
    border-radius: 12px;
    background: #fff;
    font: inherit;
    outline: none;
}

.promo-field input:focus,
.promo-field select:focus {
    border-color: #e62d36;
    box-shadow: 0 0 0 3px rgba(230, 45, 54, 0.08);
}

.promo-options {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.promo-check {
    font-size: 13px;
}

.promo-editor {
    margin-top: 20px;
}

.promo-editor > span {
    display: block;
    margin-bottom: 8px;
}

.promo-upload {
    display: block;
    margin-top: 14px;
    padding: 14px;
    border: 1px dashed #d9dce2;
    border-radius: 13px;
    background: #fafbfc;
}

.promo-upload input[type="file"] {
    display: block;
    margin-top: 8px;
}

.promo-upload em {
    display: block;
    margin-top: 7px;
    color: #7b8088;
    font-size: 12px;
    font-style: normal;
}

.promo-file-delete {
    display: inline-flex;
    margin-top: 7px;
    color: #e62d36;
    font-size: 12px;
}

.promo-write-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 24px;
}

.promo-write-actions a,
.promo-write-actions button {
    display: inline-flex;
    min-width: 110px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe2e7;
    border-radius: 12px;
    background: #fff;
    color: #34383f;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.promo-write-actions button {
    border-color: #e62d36;
    background: #e62d36;
    color: #fff;
}

/* View */
.promo-view {
    overflow: hidden;
    border: 1px solid #eceef2;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.promo-view-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 36px;
    background: linear-gradient(135deg, #fff1f2, #fff);
}

.promo-view-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.promo-view-meta span {
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    color: #e62d36;
    font-size: 11px;
    font-weight: 900;
}

.promo-view-head h1 {
    max-width: 760px;
    margin: 14px 0 8px;
    font-size: clamp(30px, 4.5vw, 48px);
    line-height: 1.2;
    letter-spacing: -0.05em;
    word-break: keep-all;
}

.promo-view-head p {
    margin: 0;
    color: #777d86;
}

.promo-view-badge {
    flex: 0 0 auto;
    padding: 9px 12px;
    border-radius: 999px;
    background: #e62d36;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.promo-view-image {
    max-height: 680px;
    overflow: hidden;
    background: #f4f5f7;
}

.promo-view-image img {
    display: block;
    width: 100%;
    max-height: 680px;
    object-fit: cover;
}

.promo-view-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: #eceef2;
}

.promo-view-summary > div {
    min-width: 0;
    padding: 20px 24px;
    background: #fff;
}

.promo-view-summary span,
.promo-view-summary strong {
    display: block;
}

.promo-view-summary span {
    margin-bottom: 6px;
    color: #8a8f97;
    font-size: 11px;
}

.promo-view-summary strong {
    color: #262a30;
    font-size: 15px;
}

.promo-view-summary del {
    margin-right: 7px;
    color: #b7bbc2;
    font-size: 12px;
}

.promo-view-copy {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 0;
    border-radius: 9px;
    background: #e62d36;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.promo-view-content {
    padding: 38px;
    color: #444951;
    font-size: 15px;
    line-height: 1.85;
}

.promo-view-content img {
    max-width: 100%;
    height: auto;
}

.promo-view-cta {
    display: flex;
    width: calc(100% - 76px);
    min-height: 58px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 0 38px 28px;
    border-radius: 15px;
    background: #e62d36;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
}

.promo-view-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 38px;
    border-top: 1px solid #eceef2;
}

.promo-view-actions a {
    margin-right: 8px;
    color: #5e646d;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 700px) {
    .promo-board-list,
    .promo-write,
    .promo-view {
        width: calc(100% - 24px);
        margin-top: 18px;
    }

    .promo-board-head,
    .promo-write-head {
        align-items: stretch;
        flex-direction: column;
        padding: 23px;
    }

    .promo-form-card {
        padding: 18px;
    }

    .promo-form-grid {
        grid-template-columns: 1fr;
    }

    .promo-field--wide {
        grid-column: auto;
    }

    .promo-view-head {
        flex-direction: column;
        padding: 26px 22px;
    }

    .promo-view-summary {
        grid-template-columns: 1fr;
    }

    .promo-view-content {
        padding: 25px 21px;
    }

    .promo-view-cta {
        width: calc(100% - 42px);
        margin: 0 21px 22px;
    }

    .promo-view-actions {
        padding: 18px 21px;
    }
}

/* =========================================================
   프로모션 발급·신청 설정
========================================================= */
.promo-field small {
    color: #8b9098;
    font-size: 11px;
    line-height: 1.5;
}

.promo-field textarea {
    width: 100%;
    min-height: 92px;
    padding: 12px 13px;
    border: 1px solid #dfe2e7;
    border-radius: 12px;
    background: #fff;
    font: inherit;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

.promo-field textarea:focus {
    border-color: #e62d36;
    box-shadow: 0 0 0 3px rgba(230, 45, 54, 0.08);
}

.promo-campaign-settings {
    margin-top: 24px;
    padding: 22px;
    border: 1px solid #e4e1ff;
    border-radius: 18px;
    background: linear-gradient(145deg, #f7f6ff, #fff);
}

.promo-campaign-settings[hidden] {
    display: none !important;
}

.promo-campaign-settings__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.promo-campaign-settings__head span {
    color: #6c5ce7;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
}

.promo-campaign-settings__head h2 {
    margin: 5px 0 6px;
    color: #22252b;
    font-size: 21px;
}

.promo-campaign-settings__head p {
    margin: 0;
    color: #7c818a;
    font-size: 12px;
    line-height: 1.6;
}

.promo-campaign-grid {
    margin-top: 0;
}

.promo-switch {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.promo-switch input {
    position: absolute;
    opacity: 0;
}

.promo-switch span {
    position: relative;
    width: 48px;
    height: 27px;
    border-radius: 999px;
    background: #d7dbe1;
    transition: .2s ease;
}

.promo-switch span::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,.15);
    transition: .2s ease;
}

.promo-switch input:checked + span {
    background: #6c5ce7;
}

.promo-switch input:checked + span::after {
    transform: translateX(21px);
}

.promo-switch b {
    color: #4d525a;
    font-size: 12px;
}

.promo-active-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 16px;
    color: #555b64;
    font-size: 12px;
    font-weight: 800;
}

/* 상세페이지 실시간 패널 */
.promo-view-live {
    margin: 28px 38px 0;
    padding: 22px;
    border: 1px solid #e1deff;
    border-radius: 18px;
    background: linear-gradient(145deg, #f5f4ff, #fff);
}

.promo-view-live .promo-live__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.promo-view-live .promo-live__top span,
.promo-view-live .promo-live__top strong {
    display: block;
}

.promo-view-live .promo-live__top span {
    margin-bottom: 4px;
    color: #858a92;
    font-size: 11px;
    font-weight: 800;
}

.promo-view-live .promo-live__top strong {
    color: #24272d;
    font-size: 20px;
    line-height: 1.35;
}

.promo-view-live .promo-live__top em {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: #6c5ce7;
    color: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.promo-view-live .promo-live__quantity {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 17px;
}

.promo-view-live .promo-live__quantity span {
    color: #6c5ce7;
    font-size: 15px;
    font-weight: 900;
}

.promo-view-live .promo-live__quantity span b {
    margin-right: 3px;
    font-size: 30px;
}

.promo-view-live .promo-live__quantity small {
    color: #8a8f97;
}

.promo-view-live .promo-live__bar {
    height: 9px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8e8f5;
}

.promo-view-live .promo-live__bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #5b5ce2, #8c7cff);
    transition: width .3s ease;
}

.promo-view-live .promo-live__deadline {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    color: #686d75;
    font-size: 12px;
    font-weight: 800;
}

.promo-view-live dl {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid #ebeaf5;
}

.promo-view-live dt {
    color: #858a92;
    font-size: 12px;
    font-weight: 800;
}

.promo-view-live dd {
    margin: 0;
    color: #373b42;
    font-size: 13px;
    line-height: 1.6;
}

.promo-claim-button {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    margin-top: 17px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, #5b5ce2, #7c6cff);
    color: #fff;
    font-family: inherit;
    font-weight: 900;
    cursor: pointer;
}

.promo-claim-button--large {
    min-height: 56px;
    font-size: 15px;
}

.promo-claim-button:disabled {
    background: #d5d8dd;
    color: #777c84;
    cursor: not-allowed;
}

.promo-claim-button.is-loading span::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 7px;
    border: 2px solid rgba(255,255,255,.45);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: -2px;
    animation: promo-skin-spin .7s linear infinite;
}

@keyframes promo-skin-spin {
    to { transform: rotate(360deg); }
}

.promo-issued-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding: 12px;
    border: 1px dashed #9c94ef;
    border-radius: 11px;
    background: #fff;
}

.promo-issued-code span {
    min-width: 0;
    overflow: hidden;
    font-family: monospace;
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.promo-issued-code a {
    flex: 0 0 auto;
    color: #5b5ce2;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

/* 공통 결과 모달 */
html.promo-modal-open {
    overflow: hidden;
}

.promo-result-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.promo-result-modal[hidden] {
    display: none !important;
}

.promo-result-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.58);
    backdrop-filter: blur(4px);
}

.promo-result-modal__dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(calc(100% - 30px), 430px);
    padding: 30px;
    border-radius: 24px;
    background: #fff;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0,0,0,.24);
    transform: translate(-50%, -50%);
}

.promo-result-modal__dialog > i {
    color: #5b5ce2;
    font-size: 48px;
}

.promo-result-modal__dialog h2 {
    margin: 14px 0 8px;
    font-size: 22px;
}

.promo-result-modal__dialog p {
    margin: 0;
    color: #737881;
    font-size: 13px;
    line-height: 1.7;
}

.promo-result-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: transparent;
    color: #91969e;
    font-size: 28px;
    cursor: pointer;
}

.promo-result-modal__code {
    margin-top: 18px;
    padding: 14px;
    border: 1px dashed #9c94ef;
    border-radius: 13px;
    background: #f5f4ff;
    font-family: monospace;
    font-size: 16px;
    font-weight: 900;
}

.promo-result-modal__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 20px;
}

.promo-result-modal__actions a,
.promo-result-modal__actions button {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e1e4e8;
    border-radius: 11px;
    background: #fff;
    color: #3e434a;
    font-family: inherit;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.promo-result-modal__actions a[data-modal-download] {
    border-color: #5b5ce2;
    background: #5b5ce2;
    color: #fff;
}

@media (max-width: 700px) {
    .promo-campaign-settings {
        padding: 17px;
    }

    .promo-campaign-settings__head {
        align-items: stretch;
        flex-direction: column;
    }

    .promo-view-live {
        margin: 20px 21px 0;
        padding: 17px;
    }

    .promo-view-live dl {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .promo-result-modal__dialog {
        padding: 27px 19px 20px;
    }

    .promo-result-modal__actions {
        grid-template-columns: 1fr;
    }
}

.promo-board-head-actions {
    display: flex;
    gap: 8px;
}

.promo-board-count {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    color: #5b5ce2;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

.promo-board-count b {
    font-size: 16px;
}

.promo-board-count small {
    color: #8b9098;
    font-size: 10px;
}

.promo-board-off {
    color: #a0a5ad;
    font-size: 11px;
}
