/* =========================================================
   RX Prescription Manager — Frontend Styles
   ========================================================= */

/* ── Wrapper ─────────────────────────────────────────────── */
.rx-uploader-wrap {
    max-width: 540px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    font-family: inherit;
}

/* ── Header ──────────────────────────────────────────────── */
.rx-uploader-header { margin-bottom: 28px; }

.rx-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
}
.rx-subtitle {
    font-size: .95rem;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

/* ── Login Prompt ────────────────────────────────────────── */
.rx-login-prompt {
    text-align: center;
    padding: 20px 0;
}
.rx-lock-icon {
    font-size: 2.8rem;
    margin-bottom: 12px;
}
.rx-login-prompt p {
    color: #444;
    margin-bottom: 20px;
}

/* ── Active Prescription Banner ──────────────────────────── */
.rx-status-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px;
    border-radius: 10px;
    text-align: center;
}
.rx-status-approved {
    background: #f0fdf4;
    border: 1.5px solid #22c55e;
}
.rx-status-approved p { color: #166534; margin: 0; }
.rx-icon { font-size: 2rem; }

/* ── Form ────────────────────────────────────────────────── */
.rx-form-row {
    margin-bottom: 20px;
}
.rx-form-row label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    color: #333;
    margin-bottom: 6px;
}
.rx-required { color: #e53e3e; }

.rx-form-row input[type="text"],
.rx-form-row input[type="tel"] {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: .95rem;
    transition: border-color .2s;
    box-sizing: border-box;
    outline: none;
}
.rx-form-row input[type="text"]:focus,
.rx-form-row input[type="tel"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,.12);
}

/* ── Drop Zone ───────────────────────────────────────────── */
.rx-drop-zone {
    border: 2px dashed #0073aa;
    border-radius: 10px;
    background: #f0f7ff;
    cursor: pointer;
    transition: background .2s, border-color .2s;
    padding: 28px 20px;
    text-align: center;
}
.rx-drop-zone:hover,
.rx-drop-zone.rx-drag-over {
    background: #dbeeff;
    border-color: #005a87;
}
.rx-upload-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.rx-drop-text   { font-weight: 600; color: #0073aa; margin: 0 0 4px; }
.rx-drop-hint   { font-size: .82rem; color: #888; margin: 0; }
.rx-file-name   {
    margin: 10px 0 0;
    font-size: .88rem;
    font-weight: 600;
    color: #166534;
    background: #f0fdf4;
    padding: 5px 10px;
    border-radius: 6px;
    display: inline-block;
}

/* ── Messages ────────────────────────────────────────────── */
.rx-form-messages {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: .9rem;
    font-weight: 500;
}
.rx-form-messages.rx-msg-success {
    background: #f0fdf4;
    color: #166534;
    border: 1.5px solid #22c55e;
}
.rx-form-messages.rx-msg-error {
    background: #fff5f5;
    color: #c53030;
    border: 1.5px solid #fc8181;
}

/* ── Button ──────────────────────────────────────────────── */
.rx-btn {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    text-decoration: none;
    line-height: 1;
}
.rx-btn:hover     { background: #005a87; color: #fff; }
.rx-btn:active    { transform: scale(.97); }
.rx-btn:disabled  { background: #9ca3af; cursor: not-allowed; }
.rx-submit-btn    { width: 100%; text-align: center; margin-top: 4px; }

/* ── My Prescriptions (Account Page) ─────────────────────── */
.rx-prescriptions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}
.rx-prescriptions-table th,
.rx-prescriptions-table td {
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    text-align: left;
}
.rx-prescriptions-table th { background: #f9fafb; font-weight: 700; }

.rx-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    text-transform: capitalize;
}
.rx-badge-pending  { background: #fff7ed; color: #c2410c; }
.rx-badge-approved { background: #f0fdf4; color: #166534; }
.rx-badge-rejected { background: #fff5f5; color: #c53030; }
.rx-badge-expired  { background: #f3f4f6; color: #6b7280; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 540px) {
    .rx-uploader-wrap { padding: 24px 18px; }
    .rx-prescriptions-table { font-size: .82rem; }
    .rx-prescriptions-table th,
    .rx-prescriptions-table td { padding: 8px; }
}

/* ── Premium Modal ───────────────────────────────────────── */
.rx-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.rx-modal-overlay.rx-active {
    opacity: 1;
    visibility: visible;
}
.rx-modal-content {
    background: #fff;
    width: 90%;
    max-width: 480px;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rx-modal-overlay.rx-active .rx-modal-content {
    transform: scale(1) translateY(0);
}

.rx-modal-header { text-align: center; margin-bottom: 24px; }
.rx-modal-icon {
    font-size: 3rem;
    background: #f0f7ff;
    width: 80px; height: 80px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    margin: 0 auto 16px;
    color: #0073aa;
}
.rx-modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px;
}
.rx-modal-desc {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
}

.rx-modal-products {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
}
.rx-modal-product-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #334155;
}
.rx-modal-product-item:last-child { border-bottom: none; }
.rx-modal-product-item::before { content: "💊"; font-size: 1.1rem; }

.rx-modal-footer {
    display: flex;
    gap: 12px;
}
.rx-modal-footer .rx-btn {
    flex: 1;
    text-align: center;
    padding: 14px;
    font-size: 0.95rem;
}
.rx-btn-outline {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #64748b;
}
.rx-btn-outline:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}
