/* ===== Layout ===== */
.ob-logo {
    position: fixed;
    top: 1rem;
    left: 1.5rem;
    height: 32px;
    z-index: 10;
}

.ob-main {
    max-width: 720px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ===== Progress bar ===== */
.prog-wrap {
    max-width: 600px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0 1rem;
}

.prog-s {
    display: flex;
    align-items: center;
    gap: 0;
}

.prog-n {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--border-gray);
    color: var(--text-gray);
    transition: all 0.3s;
    flex-shrink: 0;
}

.prog-s.active .prog-n {
    background: var(--orange);
    color: white;
    box-shadow: 0 0 0 4px rgba(244, 123, 37, 0.2);
}

.prog-s.done .prog-n {
    background: var(--green);
    color: white;
}

.prog-l {
    width: 40px;
    height: 3px;
    background: var(--border-gray);
    transition: background 0.3s;
}

.prog-s.done .prog-l {
    background: var(--green);
}

.prog-label {
    display: none;
}

/* ===== Step containers ===== */
.step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Loading step ===== */
.load-wrap {
    text-align: center;
    padding: 3rem 0;
}

.spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    position: relative;
}

.spinner::before, .spinner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid transparent;
}

.spinner::before {
    border-top-color: var(--orange);
    animation: spin 1s linear infinite;
}

.spinner::after {
    border-bottom-color: var(--navy);
    animation: spin 1.5s linear infinite reverse;
    inset: 6px;
}

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

.load-msg {
    font-size: 1rem;
    color: var(--text-gray);
    transition: opacity 0.3s;
    min-height: 1.5rem;
}

.load-err {
    display: none;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(229, 62, 62, 0.08);
    border-radius: 12px;
    color: var(--red);
}

/* ===== Site cards ===== */
.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.site-card {
    background: var(--white);
    border: 2px solid var(--border-gray);
    border-radius: 16px;
    padding: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    position: relative;
}

.site-card:hover { transform: translateY(-2px); }

.site-card.sel {
    border-color: var(--orange);
    background: rgba(244, 123, 37, 0.04);
}

.site-card .sc-logo {
    width: 166px;
    height: 166px;
    object-fit: contain;
    margin-bottom: 0.3rem;
}

.site-card .sc-name { font-weight: 600; font-size: 1.14rem; }
.site-card .sc-cat { font-size: 0.96rem; color: var(--text-gray); }
.site-card .sc-views { font-size: 0.96rem; color: var(--orange); font-weight: 600; margin-top: 0.2rem; }

.site-card .sc-score {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--orange);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
}

.site-card .sc-reason {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-top: 0.4rem;
    line-height: 1.3;
}

.reach-bar {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-align: center;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.reach-bar .reach-num { color: var(--orange); font-size: 1.3rem; }

/* ===== Content ideas ===== */
.idea-grid {
    display: grid;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.idea-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--white);
    border: 2px solid var(--border-gray);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.idea-card:hover { border-color: var(--orange); }
.idea-card.sel { border-color: var(--orange); background: rgba(244, 123, 37, 0.04); }

.idea-card .ic-check {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--border-gray);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.idea-card.sel .ic-check {
    background: var(--orange);
    border-color: var(--orange);
    color: white;
}

.idea-card .ic-body { flex: 1; }
.idea-card .ic-title { font-weight: 600; font-size: 0.95rem; }
.idea-card .ic-meta { font-size: 0.8rem; color: var(--text-gray); margin-top: 0.2rem; }
.idea-card .ic-angle { font-size: 0.85rem; color: var(--text-gray); margin-top: 0.3rem; }

/* ===== Price cards ===== */
.price-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.price-card {
    background: var(--white);
    border: 2px solid var(--border-gray);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.price-card:hover { border-color: var(--orange); transform: translateY(-2px); }

.price-card.sel {
    border-color: var(--orange);
    border-width: 3px;
    box-shadow: 0 4px 20px rgba(244, 123, 37, 0.15);
}

.price-card.featured {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
}

.price-card.featured .pc-per { color: rgba(255,255,255,0.7); }

.price-card .pc-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--orange);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 50px;
}

.price-card .pc-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.price-card .pc-articles {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.price-card.featured .pc-articles { color: rgba(255,255,255,0.7); }

.price-card .pc-price {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.price-card .pc-per {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.price-card .pc-features {
    list-style: none;
    text-align: left;
    font-size: 0.85rem;
    line-height: 2;
}

.price-card .pc-features li::before {
    content: '✓ ';
    color: var(--green);
    font-weight: 700;
}

.price-card.featured .pc-features li::before { color: var(--orange); }

.price-card .pc-btn {
    margin-top: 1.5rem;
    width: 100%;
    padding: 0.8rem;
    border-radius: 10px 35px 35px 10px;
    border: 2px solid var(--orange);
    background: transparent;
    color: var(--orange);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.price-card .pc-btn:hover, .price-card.sel .pc-btn {
    background: var(--orange);
    color: white;
}

/* ===== Upsell cards ===== */
.upsell-card {
    background: var(--white);
    border: 2px solid var(--border-gray);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.upsell-card.active { border-color: var(--orange); }

.upsell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.upsell-info { flex: 1; }
.upsell-info h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.upsell-info p { font-size: 0.85rem; color: var(--text-gray); line-height: 1.4; }

.upsell-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--orange);
    white-space: nowrap;
}

.upsell-detail {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-gray);
    display: none;
}

.upsell-card.active .upsell-detail { display: block; }

/* ===== Previous campaign cards ===== */
.campaign-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.campaign-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 2px solid var(--border-gray);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
}

.campaign-card:hover {
    border-color: var(--orange);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.campaign-thumb {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: var(--light-gray);
}

.campaign-thumb--logo {
    object-fit: contain;
    padding: 1.2rem 2rem;
    height: 100px;
    box-sizing: border-box;
}

.campaign-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    position: relative;
}

.campaign-cat {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.campaign-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.campaign-summary {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.5;
}

.campaign-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--orange);
    text-decoration: none;
    margin-top: 0.5rem;
    align-self: flex-end;
}

.campaign-card:hover .campaign-link { text-decoration: underline; }

.campaign-site {
    color: var(--orange);
    font-weight: 600;
}

/* ===== Confirmation ===== */
.conf-check {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.conf-summary {
    background: var(--light-gray);
    border-radius: 14px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.conf-summary .cs-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-gray);
    font-size: 0.95rem;
}

.conf-summary .cs-row:last-child { border-bottom: none; }
.conf-summary .cs-label { color: var(--text-gray); }
.conf-summary .cs-value { font-weight: 600; }

/* ===== Collapsible section ===== */
.collapsible-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--orange);
    font-size: 0.95rem;
    margin: 1.5rem 0 1rem;
    user-select: none;
}

.collapsible-toggle .arrow {
    transition: transform 0.2s;
    font-size: 0.8rem;
}

.collapsible-toggle.open .arrow { transform: rotate(90deg); }

.collapsible-content {
    display: none;
}

.collapsible-content.open { display: block; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .ob-main { margin: 1rem auto; }
    .price-grid { grid-template-columns: 1fr; }
    .site-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .prog-label { display: none; }
    .campaign-grid { grid-template-columns: 1fr; }
    .campaign-body { padding: 1rem; }
    #confEmailMsg { word-break: break-word; overflow-wrap: break-word; }
    .conf-summary .cs-value { word-break: break-word; overflow-wrap: break-word; max-width: 60%; text-align: right; }
}

/* ===== Date Picker Modal ===== */
.date-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.date-modal-overlay.open {
    display: flex;
}

.date-modal {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    width: 320px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.date-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.date-month-label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--navy);
}

.date-nav {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--navy);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
}

.date-nav:hover {
    background: var(--light-gray);
}

.date-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.date-grid .date-day-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-gray);
    padding: 0.3rem 0;
}

.date-grid .date-day {
    font-size: 0.85rem;
    padding: 0.45rem 0;
    border-radius: 8px;
    cursor: pointer;
    color: var(--navy);
    border: none;
    background: none;
}

.date-grid .date-day:hover {
    background: var(--light-gray);
}

.date-grid .date-day.disabled {
    color: #ccc;
    pointer-events: none;
}

.date-grid .date-day.selected {
    background: var(--orange);
    color: white;
    font-weight: 600;
}

.date-cancel {
    display: block;
    margin: 1rem auto 0;
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 0.85rem;
    cursor: pointer;
}

.date-cancel:hover {
    color: var(--navy);
}
