﻿/* 캠페인 STEP4: 기존 공통 폰트/색을 존중하는 독립 클래스 */
.cp-campaign-form-wrap,
.cp-campaign-list-wrap,
.cp-campaign-public {
    width: min(100% - 32px, 1120px);
    margin: 30px auto 65px;
    color: #28354c;
}
.cp-campaign-admin {
    width: min(100%, 1200px);
    margin: 0 auto;
}
.cp-campaign-form-wrap h1,
.cp-campaign-list-wrap h1,
.cp-campaign-public h1 {
    font-size: 23px;
    margin: 0 0 12px;
}
.cp-campaign-note { font-size: 13px; color: #707b8e; margin: 10px 0 20px; }
.cp-campaign-error { color: #a21d22; background: #fff2f2; padding: 12px; border-radius: 8px; }
.cp-campaign-notice { color: #25653c; background: #effbf1; padding: 12px; border-radius: 8px; }
.cp-campaign-edit-form {
    display: grid;
    gap: 18px;
    padding: 26px;
    border: 1px solid #e3e7ef;
    background: #fff;
    border-radius: 12px;
    min-width: 0;
}
.cp-campaign-edit-form label { display: grid; gap: 7px; font-weight: 650; font-size: 13px; min-width: 0; }
.cp-campaign-edit-form input,
.cp-campaign-edit-form select,
.cp-campaign-edit-form textarea,
.cp-campaign-filters input,
.cp-campaign-filters select {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    border: 1px solid #dce3ee;
    border-radius: 7px;
    padding: 9px 11px;
    color: #28354c;
    background: white;
    font: 12px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
}
.cp-campaign-admin .cp-campaign-edit-form input,
.cp-campaign-admin .cp-campaign-edit-form select,
.cp-campaign-admin .cp-campaign-edit-form textarea,
.cp-campaign-admin .cp-campaign-filters input,
.cp-campaign-admin .cp-campaign-filters select { font-size: 14px; }
.cp-campaign-edit-form fieldset { padding: 15px; border: 1px solid #e0e6ed; border-radius: 9px; min-width: 0; }
.cp-campaign-edit-form legend { padding: 0 8px; font-size: 14px; font-weight: 750; }
.cp-campaign-two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.cp-campaign-type-box { display: grid; gap: 12px; }
.cp-campaign-type-box[hidden] { display: none; }
.cp-campaign-actions,
.cp-campaign-row-actions,
.cp-campaign-filters,
.cp-campaign-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cp-campaign-filters { margin: 19px 0; }
.cp-campaign-filters input { flex: 2 1 240px; }
.cp-campaign-filters select { flex: 1 1 160px; }
.cp-campaign-action,
.cp-campaign-pages a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    border-radius: 7px;
    border: 1px solid #d8dfeb;
    background: white;
    color: #354052;
    text-decoration: none;
    padding: 8px 13px;
    min-height: 36px;
    font: 13px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
    cursor: pointer;
}
.cp-campaign-primary { background: #f05b42; color: white; border-color: #f05b42; }
.cp-campaign-danger { background: #fff4f4; color: #c52126; border-color: #f1c4c4; }
.cp-campaign-table-scroll { max-width: 100%; overflow-x: auto; background: white; border-radius: 9px; }
.cp-campaign-table { width: 100%; border-collapse: collapse; min-width: 760px; text-align: left; }
.cp-campaign-table th, .cp-campaign-table td { padding: 13px 10px; border-bottom: 1px solid #e5e9f1; font-size: 13px; }
.cp-campaign-table th { background: #f8fafc; color: #5e6980; }
.cp-campaign-table td strong { font-weight: 700; }
.cp-campaign-pages { margin: 18px 0; justify-content: center; }
.cp-campaign-pages .is-current { background: #f05b42; color: white; border-color: #f05b42; }
.cp-campaign-details { display: grid; grid-template-columns: 125px 1fr; gap: 0; border-top: 1px solid #e8edf2; margin: 18px 0; }
.cp-campaign-details dt, .cp-campaign-details dd { margin: 0; padding: 12px; border-bottom: 1px solid #e8edf2; font-size: 13px; }
.cp-campaign-details dt { background: #f8fafb; color: #687589; }
.cp-campaign-mission { background: white; border: 1px solid #e2e7f0; border-radius: 9px; padding: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cp-campaign-mission img { max-width: 100%; height: auto; }
.cp-campaign-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 20px 0; }
.cp-campaign-card { overflow: hidden; border-radius: 12px; background: white; border: 1px solid #e5e8ee; }
.cp-campaign-card a { display: block; color: inherit; text-decoration: none; }
.cp-campaign-card img, .cp-campaign-placeholder { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: #fff2ea; }
.cp-campaign-placeholder { display: grid; place-items: center; color: #e56a57; font-weight: 800; }
.cp-campaign-card-body { padding: 15px; }
.cp-campaign-card-body h2 { font-size: 16px; margin: 7px 0; }
.cp-campaign-card-body p { font-size: 13px; color: #69768b; }
.cp-campaign-card-body small { font-size: 12px; }
.cp-campaign-cover { display: block; width: min(640px, 100%); border-radius: 12px; margin: 18px 0; }
#cp-cover-preview img { width: min(100%, 300px); border-radius: 8px; display: block; }
.cp-campaign-form-wrap .cke, .cp-campaign-form-wrap .cke_inner { max-width: 100%; min-width: 0; }
@media (max-width: 1024px) {
    .cp-campaign-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .cp-campaign-edit-form { padding: 14px; }
    .cp-campaign-two-col { grid-template-columns: 1fr; }
    .cp-campaign-card-grid { grid-template-columns: 1fr; }
    .cp-campaign-form-wrap, .cp-campaign-list-wrap, .cp-campaign-public { width: calc(100% - 24px); margin-top: 20px; }
    .cp-campaign-admin { width: 100%; }
    .cp-campaign-edit-form input, .cp-campaign-edit-form select, .cp-campaign-edit-form textarea, .cp-campaign-filters input, .cp-campaign-filters select { font-size: 14px; }
}


/* STEP 8-4: 일반 사용자용 캠페인 상세페이지. 관리자에는 적용되지 않습니다. */
body.cp-user-site .cp-campaign-view {
    width: min(100% - 32px, 1120px);
    margin: 28px auto 55px;
    padding: 28px 32px;
    border: 1px solid #e7eaf1;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 16px rgba(18, 34, 54, .025);
    min-width: 0;
}
body.cp-user-site .cp-campaign-view > h1 { font-size: 25px; line-height: 1.45; margin: 10px 0 12px; }
body.cp-user-site .cp-campaign-view > h2 { font-size: 17px; margin: 25px 0 14px; }
body.cp-user-site .cp-campaign-view > p { line-height: 1.65; font-size: 13px; }
body.cp-user-site .cp-campaign-view .cp-campaign-details {
    border-top: 1px solid #e4e9f2;
    grid-template-columns: 135px minmax(0,1fr);
}
body.cp-user-site .cp-campaign-view .cp-campaign-details dt,
body.cp-user-site .cp-campaign-view .cp-campaign-details dd { padding: 13px 15px; font-size: 12px; overflow-wrap: anywhere; }
body.cp-user-site .cp-campaign-view .cp-campaign-cover { max-width: 100%; width: min(510px,100%); }
body.cp-user-site .cp-campaign-view .cp-campaign-mission { background: #f9fafc; font-size: 13px; line-height: 1.7; }
body.cp-user-site .cp-campaign-view .cp-campaign-action { margin: 8px 6px 0 0; }
@media(max-width:640px) {
    body.cp-user-site .cp-campaign-view { width: calc(100% - 24px); padding: 18px 14px; margin-top: 16px; }
    body.cp-user-site .cp-campaign-view > h1 { font-size: 20px; }
    body.cp-user-site .cp-campaign-view .cp-campaign-details { grid-template-columns: 106px minmax(0,1fr); }
    body.cp-user-site .cp-campaign-view .cp-campaign-details dt,
    body.cp-user-site .cp-campaign-view .cp-campaign-details dd { padding: 11px 9px; }
}
