/* WSA Apply Now Modal + Resources Styles */

.wsa-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #5b2574;
    color: #ffffff;
    padding: 11px 22px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0.005em;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    text-decoration: none;
    font-family: inherit;
}
.wsa-apply-btn:hover,
.wsa-apply-btn:focus {
    background: #3d1850;
    color: #ffffff;
    transform: translateY(-1px);
    text-decoration: none;
    outline: none;
}
.wsa-apply-btn .wsa-arrow {
    transition: transform 0.2s ease;
    display: inline-block;
}
.wsa-apply-btn:hover .wsa-arrow {
    transform: translateX(3px);
}

/* MODAL */

.wsa-modal-overlay {
    position: fixed;
    inset: 0;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(10, 10, 15, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 999999;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "DM Sans", "Segoe UI", Roboto, sans-serif;
}
.wsa-modal-overlay.wsa-open {
    opacity: 1;
    pointer-events: auto;
}
.wsa-modal-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 16px;
    padding: 26px 24px 24px;
    box-shadow: 0 20px 60px rgba(10, 10, 15, 0.2);
    position: relative;
    transform: scale(0.95) translateY(8px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
    color: #0a0a0f;
}
.wsa-modal-overlay.wsa-open .wsa-modal-card {
    transform: scale(1) translateY(0);
}
.wsa-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: #f7f7f9;
    border: none;
    border-radius: 8px;
    color: #2d2d35;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    padding: 0;
    font-family: inherit;
}
.wsa-modal-close:hover {
    background: #e6e6eb;
    color: #0a0a0f;
}
.wsa-modal-title {
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.25;
    margin: 0 0 6px;
    padding-right: 32px;
    color: #0a0a0f;
}
.wsa-modal-status {
    font-size: 0.86rem;
    color: #5f5f6b;
    line-height: 1.45;
    margin: 0 0 16px;
    min-height: 20px;
    transition: opacity 0.2s ease;
}
.wsa-progress-track {
    width: 100%;
    height: 5px;
    background: #e6e6eb;
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 20px;
}
.wsa-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #5b2574, #8a4cb3);
    border-radius: 100px;
    transition: width linear;
}
.wsa-ad-slot {
    width: 100%;
    max-width: 300px;
    min-height: 250px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.wsa-ad-slot:empty {
    display: none;
}
.wsa-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}
.wsa-modal-actions.wsa-show {
    opacity: 1;
    pointer-events: auto;
    max-height: 200px;
}
.wsa-btn-primary,
.wsa-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 13px 16px;
    border-radius: 9px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0.005em;
    border: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    box-sizing: border-box;
}
.wsa-btn-primary {
    background: #5b2574;
    color: #ffffff;
}
.wsa-btn-primary:hover {
    background: #3d1850;
    color: #ffffff;
    transform: translateY(-1px);
}
.wsa-btn-secondary {
    background: #ffffff;
    color: #2d2d35;
    border: 1.5px solid #d8d8de;
}
.wsa-btn-secondary:hover {
    border-color: #5b2574;
    color: #5b2574;
}

.wsa-modal-card.wsa-completed .wsa-progress-track {
    display: none;
}

body.wsa-modal-open {
    overflow: hidden;
}

/* RESOURCES SECTION (auto-injected after post content) */

.wsa-resources {
    background: #faf6fc;
    border-top: 4px solid #5b2574;
    padding: 36px 24px;
    margin: 32px 0 0;
    border-radius: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "DM Sans", "Segoe UI", Roboto, sans-serif;
    color: #0a0a0f;
    box-sizing: border-box;
}
.wsa-resources-head {
    text-align: center;
    max-width: 540px;
    margin: 0 auto 24px;
}
.wsa-resources-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #5b2574;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.wsa-resources-title {
    font-size: clamp(1.2rem, 3.2vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.018em;
    line-height: 1.22;
    margin: 0 0 6px;
    color: #0a0a0f;
}
.wsa-resources-subtitle {
    font-size: 0.88rem;
    color: #5f5f6b;
    line-height: 1.5;
    margin: 0;
}

.wsa-resource-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    max-width: 880px;
    margin: 0 auto;
}
@media (min-width: 540px) {
    .wsa-resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 720px) {
    .wsa-resource-grid.wsa-three-card {
        grid-template-columns: repeat(3, 1fr);
    }
}

.wsa-resource-card {
    background: #ffffff;
    border: 1px solid #e6e6eb;
    border-radius: 12px;
    padding: 20px 18px 18px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #0a0a0f;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}
.wsa-resource-card:hover,
.wsa-resource-card:focus {
    border-color: #5b2574;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(10, 10, 15, 0.08);
    text-decoration: none;
    color: #0a0a0f;
    outline: none;
}
.wsa-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 8px;
}
.wsa-card-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(155deg, #3d1850 0%, #5b2574 70%);
    color: #ffffff;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wsa-card-icon svg {
    width: 22px;
    height: 22px;
}
.wsa-card-tag {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 100px;
    background: #f5edfa;
    color: #5b2574;
    line-height: 1.4;
    flex-shrink: 0;
}
.wsa-card-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.012em;
    line-height: 1.28;
    margin: 0 0 6px;
    color: #0a0a0f;
}
.wsa-card-desc {
    font-size: 0.85rem;
    color: #5f5f6b;
    line-height: 1.5;
    margin: 0 0 14px;
    flex-grow: 1;
}
.wsa-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #5b2574;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12.5px;
    letter-spacing: 0.005em;
    transition: background 0.15s ease;
    width: 100%;
    box-sizing: border-box;
}
.wsa-resource-card:hover .wsa-card-btn {
    background: #3d1850;
}
.wsa-card-btn .wsa-arrow {
    transition: transform 0.2s ease;
    font-size: 14px;
    display: inline-block;
}
.wsa-resource-card:hover .wsa-card-btn .wsa-arrow {
    transform: translateX(3px);
}

@media (max-width: 540px) {
    .wsa-modal-card { padding: 22px 20px 20px; }
    .wsa-modal-title { font-size: 1.05rem; }
    .wsa-ad-slot { min-height: 220px; }
    .wsa-resources { padding: 28px 18px; }
}
