/* ================================================================
   PSU Calculator Page — Clean Modern Redesign
   Namespace: .pc  (psu-calculator)
   Matches the visual language of psu-results-page.css (.pr)
   ================================================================ */

/* ── Reset & container ── */
.pc *, .pc *::before, .pc *::after { box-sizing: border-box; }

.pc {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 20px 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    color: #1d2d3f;
    line-height: 1.6;
}

/* ── Hero section ── */
.pc-hero {
    text-align: center;
    padding: 48px 0 36px;
}

.pc-hero-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.pc-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.15;
    color: #0e2a43;
}

.pc-hero-lead {
    max-width: 580px;
    margin: 0 auto;
    font-size: 16px;
    color: #4d6880;
    line-height: 1.7;
}

/* ── Calculator card ── */
.pc-calc-card {
    background: #fff;
    border: 1px solid #e2ecf4;
    border-radius: 20px;
    padding: 36px 32px;
    margin-bottom: 28px;
    box-shadow: 0 4px 24px rgba(30, 100, 180, .06);
    position: relative;
    overflow: hidden;
}

.pc-calc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2b8ad6, #5db8ff, #67d0ff);
}

.pc-calc-header {
    text-align: center;
    margin-bottom: 28px;
}

.pc-calc-header h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #0e2a43;
}

.pc-calc-header p {
    margin: 0;
    font-size: 14px;
    color: #7b8fa3;
}

/* ── Steps indicator ── */
.pc-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.pc-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #7b8fa3;
}

.pc-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #edf4fb;
    color: #7b8fa3;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.pc-step.active .pc-step-num {
    background: linear-gradient(135deg, #2b8ad6, #5db8ff);
    color: #fff;
}

.pc-step.active {
    color: #0e2a43;
}

.pc-step-arrow {
    color: #cdd8e4;
    font-size: 16px;
}

/* ── Form layout ── */
.pc-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.pc-form-group {
    position: relative;
}

.pc-form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #3d5a74;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pc-label-icon {
    font-size: 16px;
}

/* ── Select / searchable input ── */
.pc-form-group select,
.pc-form-group .psu-searchable-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e2ecf4;
    border-radius: 14px;
    background: #f8fbff;
    color: #1d2d3f;
    appearance: none;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
    font-family: inherit;
}

.pc-form-group select:focus,
.pc-form-group .psu-searchable-input:focus {
    border-color: #2b8ad6;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(43, 138, 214, 0.1);
}

.pc-form-group select:hover,
.pc-form-group .psu-searchable-input:hover {
    border-color: #bdd5f0;
}

.pc-form-group .psu-searchable-input::placeholder {
    color: #a0b4c8;
}

.pc-form-group .psu-searchable-input.psu-error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}

/* Select dropdown arrow */
.pc-form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237b8fa3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 40px;
}

/* ── Searchable container overrides ── */
.pc .psu-searchable-container {
    position: relative;
}

.pc .psu-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    border: 1px solid #e2ecf4;
    border-radius: 14px;
    margin-top: 6px;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(30, 100, 180, .12);
}

.pc .psu-suggestion {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #3d5a74;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f2f7fc;
}

.pc .psu-suggestion:last-child {
    border-bottom: none;
}

.pc .psu-suggestion:hover {
    background: #f0f6fc;
    color: #0e2a43;
}

.pc .psu-suggestion .highlight {
    background: rgba(43, 138, 214, 0.15);
    color: #1a6bb5;
    font-weight: 600;
    border-radius: 3px;
    padding: 0 2px;
}

.pc .psu-suggestion-loading {
    padding: 16px;
    text-align: center;
    color: #7b8fa3;
    font-size: 14px;
}

.pc .psu-suggestion-empty {
    padding: 16px;
    text-align: center;
    color: #a0b4c8;
    font-size: 14px;
}

/* ── Calculate button ── */
.pc-submit-row {
    text-align: center;
    padding-top: 8px;
}

.pc-calc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 48px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #2b8ad6, #5db8ff);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 6px 24px rgba(43, 138, 214, .22);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.pc-calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(43, 138, 214, .32);
    background: linear-gradient(135deg, #1f7cc4, #4aacf4);
}

.pc-calc-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(43, 138, 214, .2);
}

.pc-calc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.pc-calc-btn-icon {
    font-size: 18px;
}

/* ── Loading state ── */
.pc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 48px 24px;
    text-align: center;
}

.pc-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #edf4fb;
    border-top-color: #2b8ad6;
    border-radius: 50%;
    animation: pc-spin 0.8s linear infinite;
}

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

.pc-loading p {
    margin: 0;
    font-size: 15px;
    color: #5a7690;
    max-width: 320px;
}

/* ── Results area ── */
.pc-results {
    margin-top: 24px;
}

.pc-error-message {
    padding: 16px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 14px;
    color: #991b1b;
    font-size: 14px;
    text-align: center;
}

/* ── Info strip (features) ── */
.pc-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}

.pc-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: #fff;
    border: 1px solid #e8f0f8;
    border-radius: 16px;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pc-feature:hover {
    border-color: #bdd5f0;
    box-shadow: 0 4px 16px rgba(30, 100, 180, .06);
}

.pc-feature-icon {
    font-size: 28px;
}

.pc-feature h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0e2a43;
}

.pc-feature p {
    margin: 0;
    font-size: 13px;
    color: #5a7690;
    line-height: 1.55;
}

/* ── Explore more section ── */
.pc-section {
    padding: 32px 28px;
    margin-bottom: 20px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e8f0f8;
}

.pc-section-muted {
    background: #f8fbff;
    border-color: #e0ecf6;
}

.pc-section-head {
    margin-bottom: 24px;
    text-align: center;
}

.pc-section-head h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #0e2a43;
}

.pc-section-head p {
    margin: 0;
    color: #5a7690;
    font-size: 15px;
}

/* Recent pages grid — reuse existing markup with light theme override */
.pc .psu-recent-pages {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.pc .psu-recent-pages h3 {
    display: none; /* hidden since we use .pc-section-head instead */
}

.pc .psu-recent-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 12px;
    margin-top: 0;
}

.pc .psu-recent-page-card {
    background: #fff;
    border: 1px solid #e2ecf4;
    border-radius: 14px;
    padding: 16px 18px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.pc .psu-recent-page-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #2b8ad6, #5db8ff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.pc .psu-recent-page-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(30, 100, 180, .1);
    border-color: #bdd5f0;
}

.pc .psu-recent-page-card:hover::before {
    transform: scaleX(1);
}

.pc .psu-recent-page-card h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.pc .psu-recent-page-card h4 a {
    color: #1d2d3f;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pc .psu-recent-page-card h4 a:hover {
    color: #2b8ad6;
}

/* ── Notification ── */
.pc .notification,
.notification {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    max-width: 380px;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.notification.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.notification.info {
    background: linear-gradient(135deg, #2b8ad6, #5db8ff);
}

/* ── Footer ── */
.pc-footer {
    text-align: center;
    padding: 24px 0 0;
    font-size: 13px;
    color: #a0b4c8;
}

.pc-footer a {
    color: #3b82c8;
    text-decoration: none;
}

.pc-footer a:hover {
    text-decoration: underline;
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 900px) {
    .pc-features {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .pc-feature {
        flex-direction: row;
        text-align: left;
        padding: 16px;
    }

    .pc-feature-icon {
        font-size: 24px;
    }
}

@media (max-width: 640px) {
    .pc {
        padding: 16px 14px 40px;
    }

    .pc-hero {
        padding: 32px 0 24px;
    }

    .pc-hero h1 {
        font-size: 22px;
    }

    .pc-hero-lead {
        font-size: 14px;
    }

    .pc-calc-card {
        padding: 24px 18px;
        border-radius: 16px;
    }

    .pc-form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pc-form-group label {
        font-size: 12px;
    }

    .pc-form-group select,
    .pc-form-group .psu-searchable-input {
        padding: 12px 14px;
        font-size: 14px;
        border-radius: 12px;
    }

    .pc-calc-btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 15px;
        border-radius: 12px;
    }

    .pc-steps {
        flex-wrap: wrap;
        gap: 6px;
    }

    .pc-step {
        font-size: 12px;
    }

    .pc-step-num {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    /* Sections */
    .pc-section {
        padding: 22px 18px;
        border-radius: 16px;
        margin-bottom: 14px;
    }

    .pc-section-head h2 {
        font-size: 19px;
    }

    /* Recent pages */
    .pc .psu-recent-pages-grid {
        grid-template-columns: 1fr;
    }

    /* Features strip as single column */
    .pc-features {
        grid-template-columns: 1fr;
    }
}
