/* ===== BRIEF PAGE STYLES ===== */

/* Custom Navbar for Brief page */
.brief-navbar.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.brief-navbar .header-inner {
    padding: 0.85rem 1.5rem 0.65rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brief-navbar .header-controls {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-soft);
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
    white-space: nowrap;
}

.back-link:hover {
    color: var(--tech-blue);
    transform: translateX(-3px);
}

.back-link .back-text-short {
    display: none;
}

/* Header Integrated Progress Bar */
.header-progress-wrap {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .header-progress-wrap {
    background: rgba(0, 0, 0, 0.03);
    border-top-color: rgba(0, 0, 0, 0.06);
}

.header-progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 1.5rem;
}

.progress-info-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.progress-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--tech-blue);
    background: var(--glow-blue);
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    border: 1px solid var(--border-hover);
}

.progress-text {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-soft);
}

.progress-pct {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--accent);
}

.header-progress-rail {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .header-progress-rail {
    background: rgba(0, 0, 0, 0.08);
}

.header-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tech-blue) 0%, #06b6d4 50%, #10b981 100%);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Page Container */
.brief-container {
    max-width: 920px;
    margin: 0 auto;
    padding: 8rem 1.5rem 5rem;
}

/* Intro Area */
.brief-intro {
    margin-bottom: 2rem;
}

.brief-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--tech-blue);
    background: var(--glow-blue);
    border: 1px solid var(--border-hover);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.1em;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.brief-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: var(--accent);
    word-break: break-word;
}

.brief-desc {
    font-size: 1.05rem;
    color: var(--text-soft);
    line-height: 1.6;
    max-width: 720px;
}

/* Steps Navigation Bar */
.steps-nav-bar {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 2.5rem;
    padding: 0.35rem 0.1rem;
}

.steps-nav-bar::-webkit-scrollbar {
    display: none;
}

.step-nav-pill {
    flex: 1;
    min-width: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-soft);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.step-nav-pill:hover {
    border-color: var(--tech-blue);
    color: var(--accent);
    transform: translateY(-1px);
}

.step-nav-pill .pill-check {
    display: none;
    color: #10b981;
    font-weight: 800;
    font-size: 0.75rem;
}

.step-nav-pill .pill-num {
    opacity: 0.6;
}

.step-nav-pill.is-completed {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.08);
    color: var(--accent);
}

.step-nav-pill.is-completed .pill-check {
    display: inline-block;
}

.step-nav-pill.is-completed .pill-num {
    display: none;
}

.step-nav-pill.is-active {
    border-color: var(--tech-blue);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
    color: var(--tech-blue);
}

.brief-desc {
    font-size: 1.05rem;
    color: var(--text-soft);
    line-height: 1.6;
    max-width: 720px;
}

/* Form Structure */
.brief-form {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.brief-step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.25rem;
    position: relative;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.brief-step-card:focus-within {
    border-color: var(--border-hover);
}

.step-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.step-num {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--tech-blue);
    background: var(--glow-blue);
    border: 1px solid var(--border);
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.step-title-wrap {
    flex: 1;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.step-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Choice Chips / Grid Options */
.chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.85rem;
}

.chip-option {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.chip-option input[type="checkbox"],
.chip-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip-content {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1.1rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
}

.chip-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.chip-option:hover .chip-content {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.chip-option input:checked + .chip-content {
    background: var(--glow-blue);
    border-color: var(--tech-blue);
    color: var(--accent);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.12);
}

[data-theme="light"] .chip-option input:checked + .chip-content {
    background: #e6f4fc;
    border-color: #0066cc;
    color: #0066cc;
    box-shadow: 0 0 10px rgba(0, 102, 204, 0.1);
}

/* Text Inputs & Textareas */
.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 640px) {
    .input-row {
        grid-template-columns: 1fr;
    }
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.field-group:last-child {
    margin-bottom: 0;
}

.field-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-soft);
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.field-label .required {
    color: #ef4444;
}

.field-input {
    width: 100%;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.1rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text);
    transition: all 0.2s;
    outline: none;
}

.field-input:focus {
    border-color: var(--tech-blue);
    box-shadow: 0 0 0 3px var(--glow-blue);
}

textarea.field-input {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

/* Feature Checkboxes Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 0.75rem;
}

.feature-item {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.feature-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.feature-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text);
    transition: all 0.2s;
}

.feature-box::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid var(--border-hover);
    flex-shrink: 0;
    transition: all 0.2s;
}

.feature-item input:checked + .feature-box {
    border-color: var(--tech-blue);
    background: var(--glow-blue);
    color: var(--accent);
}

.feature-item input:checked + .feature-box::before {
    background: var(--tech-blue);
    border-color: var(--tech-blue);
    box-shadow: inset 0 0 0 3px var(--bg-panel);
}

/* Radio Cards (Timeline, Budget, Design) */
.radio-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}

.radio-card {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.radio-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-card-content {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
}

.radio-card-title {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.radio-card-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.radio-card:hover .radio-card-content {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.radio-card input:checked + .radio-card-content {
    border-color: var(--tech-blue);
    background: var(--glow-blue);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.12);
}

/* Submit Actions Box */
.submit-panel {
    background: var(--bg-card);
    border: 1.5px solid var(--tech-blue);
    border-radius: var(--radius);
    padding: 2.25rem;
    box-shadow: 0 0 30px var(--glow-blue);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.submit-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.submit-panel-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.01em;
}

.submit-panel-desc {
    font-size: 0.9rem;
    color: var(--text-soft);
    line-height: 1.5;
}

.submit-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-tg {
    background: #0088cc;
    color: #ffffff;
    font-weight: 700;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.8rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-tg:hover {
    background: #0099e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.35);
}

.btn-wa {
    background: #25d366;
    color: #ffffff;
    font-weight: 700;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.8rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-wa:hover {
    background: #2ee672;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
}

.btn-copy {
    background: transparent;
    border: 1px solid var(--border-hover);
    color: var(--text);
    padding: 0.9rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    border-color: var(--tech-blue);
    color: var(--tech-blue);
}

/* Success Modal Notification */
.brief-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.brief-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.brief-modal-card {
    background: var(--bg-card);
    border: 1.5px solid var(--tech-blue);
    border-radius: var(--radius);
    padding: 2.5rem;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 50px var(--glow-blue);
    transform: scale(0.95);
    transition: transform 0.3s;
}

.brief-modal.active .brief-modal-card {
    transform: scale(1);
}

.modal-icon {
    font-size: 3rem;
    color: var(--tech-blue);
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.modal-text {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

/* Toast message */
.toast-msg {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--tech-blue);
    color: var(--tech-blue);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 1100;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    pointer-events: none;
}

.toast-msg.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .brief-container {
        padding: 7rem 1.25rem 4rem;
    }
    .brief-step-card {
        padding: 1.5rem 1.25rem;
    }
    .submit-panel {
        padding: 1.5rem 1.25rem;
    }
    .submit-buttons {
        flex-direction: column;
    }
    .submit-buttons button,
    .submit-buttons a {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .brief-navbar .header-inner {
        padding: 0.65rem 0.85rem 0.45rem;
    }

    .brief-navbar .header-controls {
        gap: 0.4rem;
    }

    .back-link .back-text-full {
        display: none;
    }

    .back-link .back-text-short {
        display: inline;
        font-size: 0.72rem;
    }

    .header-progress-row {
        padding: 0.35rem 0.85rem;
    }

    .progress-badge {
        display: none;
    }

    .progress-text {
        font-size: 0.72rem;
    }

    .progress-pct {
        font-size: 0.8rem;
    }

    .brief-container {
        padding: 6.25rem 0.85rem 3.5rem;
    }

    .brief-intro {
        margin-bottom: 1.5rem;
    }

    .brief-badge {
        font-size: 0.68rem;
        padding: 0.25rem 0.6rem;
        margin-bottom: 0.85rem;
    }

    .brief-title {
        font-size: 1.65rem;
        line-height: 1.2;
        margin-bottom: 0.65rem;
    }

    .brief-desc {
        font-size: 0.88rem;
        line-height: 1.45;
    }

    .steps-nav-bar {
        gap: 0.35rem;
        margin-bottom: 1.5rem;
    }

    .step-nav-pill {
        min-width: 44px;
        padding: 0.4rem 0.35rem;
        font-size: 0.68rem;
    }

    .step-nav-pill .pill-name {
        display: none;
    }

    .step-nav-pill .pill-num {
        display: inline-block !important;
        opacity: 0.9;
    }

    .step-nav-pill.is-completed .pill-num {
        display: none !important;
    }

    .brief-form {
        gap: 1.5rem;
    }

    .brief-step-card {
        padding: 1.25rem 0.85rem;
        border-radius: 12px;
    }

    .step-header {
        gap: 0.65rem;
        margin-bottom: 1.25rem;
        padding-bottom: 1rem;
    }

    .step-num {
        font-size: 0.75rem;
        padding: 0.2rem 0.45rem;
    }

    .step-title {
        font-size: 1.1rem;
    }

    .step-subtitle {
        font-size: 0.78rem;
    }

    .chip-grid {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .chip-content {
        padding: 0.75rem 0.85rem;
        font-size: 0.85rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .feature-box {
        padding: 0.75rem 0.85rem;
        font-size: 0.82rem;
    }

    .radio-cards-grid {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .radio-card-content {
        padding: 0.75rem 0.85rem;
    }

    .radio-card-title {
        font-size: 0.92rem;
    }

    .radio-card-sub {
        font-size: 0.75rem;
    }

    .input-row {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .field-input {
        padding: 0.75rem 0.85rem;
        font-size: 0.88rem;
    }

    .submit-panel {
        padding: 1.25rem 0.85rem;
        border-radius: 12px;
    }

    .submit-panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .submit-panel-title {
        font-size: 1.2rem;
    }

    .submit-panel-desc {
        font-size: 0.82rem;
    }

    .submit-buttons {
        flex-direction: column;
        gap: 0.65rem;
    }

    .submit-buttons button,
    .submit-buttons a {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1rem;
        font-size: 0.88rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
