.post-ad-page {
    color: #1f2933;
}

.post-ad-page .post-ad-alert {
    border: 1px solid #f4c76b;
    border-radius: 8px;
    background: #fff8e6;
}

.post-ad-form {
    margin-top: 24px;
}

.post-ad-step {
    border: 1px solid #dce7ef;
    border-radius: 8px;
    background: #f6fafc;
    box-shadow: 0 12px 28px rgba(20, 37, 55, 0.08);
}

.post-ad-step h4 {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #dce7ef;
    color: #1f2933;
    font-weight: 700;
}

.post-ad-field {
    margin-top: 12px;
}

.post-ad-field label {
    margin-bottom: 8px;
    color: #2f3c4b;
    font-weight: 700;
}

.post-ad-page .form-control,
.post-ad-page .form-select,
.post-ad-page input,
.post-ad-page select,
.post-ad-page textarea {
    max-width: 100% !important;
}

.post-ad-page .form-control,
.post-ad-page select,
.post-ad-page textarea {
    min-height: 44px;
    border-color: #cbd7e3;
    border-radius: 8px;
}

.post-ad-page .form-control:focus,
.post-ad-page select:focus,
.post-ad-page textarea:focus {
    border-color: #42b3e5;
    box-shadow: 0 0 0 0.2rem rgba(66, 179, 229, 0.15);
}

.post-ad-page .form-check-input {
    min-height: auto;
}

.post-ad-preview-image {
    width: min(260px, 100%);
    max-height: 180px;
    object-fit: cover;
    border: 1px solid #dce7ef;
    border-radius: 8px;
    background: #ffffff;
}

.post-ad-image-help {
    display: block;
    margin-top: 8px;
}

.post-ad-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 100%;
}

.post-ad-preview-grid img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
}

.post-ad-field-error {
    display: block;
    margin-top: 6px;
}

.post-ad-page .is-invalid {
    border-color: #dc3545;
}

.post-ad-actions {
    gap: 12px;
}

@media (max-width: 767px) {
    .post-ad-form {
        margin-top: 18px;
    }

    .post-ad-step {
        padding: 18px !important;
    }

    .post-ad-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .post-ad-actions .btn {
        width: 100%;
    }
}

/* ===================================================
   AUTHENTICATION POPUP MODAL (SCOPED TO POST-AD FLOW)
   =================================================== */
.w4-auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.w4-auth-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
}

.w4-auth-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 440px;
    z-index: 1;
    animation: w4ModalFadeIn 0.25s ease-out;
}

@keyframes w4ModalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.w4-auth-modal-content {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.w4-auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.w4-auth-modal-close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0 6px;
    transition: color 0.15s ease;
}

.w4-auth-modal-close:hover {
    color: #0f172a;
}

.w4-auth-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    background: #f1f5f9;
}

.w4-auth-tab-btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.w4-auth-tab-btn.active {
    color: #0052cc;
    background: #ffffff;
    border-bottom: 2px solid #0052cc;
}

.w4-auth-modal-body {
    padding: 24px 22px 18px;
}

.w4-auth-panel {
    display: none;
}

.w4-auth-panel.active {
    display: block;
    animation: w4PanelFade 0.2s ease;
}

@keyframes w4PanelFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.w4-auth-modal-footer {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

