/* ===============================
   MAIN WRAPPER
================================ */

.ai-prescription-wrapper {
    padding: 35px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
    font-family: "Segoe UI", Arial, sans-serif;
    border: 1px solid #e2e8f0;
}

/* Title */
.ai-prescription-wrapper h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    text-align: left;
}

/* ===============================
   FILE + BUTTON AREA
================================ */

.ai-prescription-wrapper input[type="file"] {
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 14px;
}

.ai-prescription-wrapper button {
    margin-left: 10px;
    padding: 11px 22px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-prescription-wrapper button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

/* ===============================
   RESULT AREA
================================ */

#rx_result {
    margin-top: 30px;
    font-family: "Segoe UI", sans-serif;
    line-height: 1.7;
    color: #334155;
}

/* Section Heading */
#rx_result h3 {
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 22px;
    color: #0f172a;
}

/* Paragraph */
#rx_result p {
    margin: 6px 0;
}

/* ===============================
   CARD UI
================================ */

.rx-card {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.rx-card h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #0f172a;
    font-size: 18px;
    font-weight: 600;
}

/* Medicine Card */
.rx-medicine-card {
    background: #ffffff;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    transition: 0.3s ease;
}

.rx-medicine-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.06);
}

/* ===============================
   LOADER (Premium)
================================ */

.rx-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 99999;
    color: #ffffff;
    font-size: 18px;
    backdrop-filter: blur(3px);
}

.rx-spinner {
    width: 70px;
    height: 70px;
    border: 6px solid rgba(255,255,255,0.3);
    border-top: 6px solid #38bdf8;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin-bottom: 18px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===============================
   MOBILE RESPONSIVE
================================ */

@media (max-width: 768px) {

    .ai-prescription-wrapper {
        margin: 25px 15px;
        padding: 20px;
    }

    .ai-prescription-wrapper h2 {
        font-size: 24px;
    }

    .ai-prescription-wrapper button {
        margin-top: 10px;
        margin-left: 0;
        width: 100%;
    }

    .ai-prescription-wrapper input[type="file"] {
        width: 100%;
    }
}

/* ===============================
   PROFESSIONAL RESULT GRID
================================ */

#rx_result {
    margin-top: 30px;
}

/* Desktop Grid Layout */
.rx-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

/* Full width sections */
.rx-full {
    grid-column: span 2;
}

/* Info Cards */
.rx-info-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.rx-info-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
    color: #0f172a;
}

.rx-info-card p {
    margin: 6px 0;
    color: #334155;
    font-size: 15px;
}

/* Medicine Section Professional */
.rx-medicine-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 10px;
}

/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 900px) {

    .rx-result-grid {
        grid-template-columns: 1fr;
    }

    .rx-full {
        grid-column: span 1;
    }
}