/**
 * Prescription Portal & Tracker Styling for Dr Rafik Nagy Pharmacy
 */

:root {
    --dr-primary: #14486D;
    --dr-primary-dark: #0e3450;
    --dr-primary-light: #eaf3f8;
    --dr-gold: #FAB51A;
    --dr-gold-hover: #e09f0a;
    --dr-accent: #e65100;
    --dr-navy: #0c263b;
    --dr-gray-bg: #f8fafc;
    --dr-border: #dbe7ef;
    --dr-text: #0c263b;
    --dr-muted: #536b7d;
    --dr-shadow: 0 4px 6px -1px rgba(20, 72, 109, 0.08), 0 2px 4px -1px rgba(20, 72, 109, 0.04);
}

.dr-rx-portal-container {
    max-width: 760px;
    margin: 30px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(20, 72, 109, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--dr-border);
    padding: 35px;
    direction: rtl;
    font-family: inherit;
}

.dr-rx-portal-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--dr-border);
    padding-bottom: 25px;
}

.dr-rx-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--dr-primary-light);
    border-radius: 50%;
    font-size: 32px;
    margin-bottom: 12px;
    border: 2px solid rgba(0, 122, 83, 0.2);
}

.dr-rx-portal-header h2 {
    font-size: 26px;
    color: var(--dr-navy);
    margin: 0 0 10px 0;
    font-weight: 800;
}

.dr-rx-portal-header p {
    color: var(--dr-muted);
    font-size: 15px;
    margin: 0;
    line-height: 1.6;
}

.dr-rx-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.dr-rx-field-group {
    display: flex;
    flex-direction: column;
}

.dr-rx-field-group.full-width {
    grid-column: 1 / -1;
    margin-bottom: 18px;
}

.dr-rx-field-group label {
    font-size: 14px;
    font-weight: 700;
    color: var(--dr-text);
    margin-bottom: 6px;
}

.dr-rx-field-group input,
.dr-rx-field-group select,
.dr-rx-field-group textarea {
    padding: 12px 14px;
    border: 1.5px solid var(--dr-border);
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    transition: all 0.2s ease;
    color: var(--dr-text);
}

.dr-rx-field-group input:focus,
.dr-rx-field-group select:focus,
.dr-rx-field-group textarea:focus {
    outline: none;
    border-color: var(--dr-primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 83, 0.15);
}

.dr-rx-field-group .field-hint {
    font-size: 12px;
    color: var(--dr-muted);
    margin-top: 4px;
}

/* Dropzone */
.dr-rx-dropzone {
    border: 2px dashed #94a3b8;
    background: #f8fafc;
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.25s ease;
}

.dr-rx-dropzone:hover,
.dr-rx-dropzone.dragover {
    border-color: var(--dr-primary);
    background: var(--dr-primary-light);
}

.dr-rx-dropzone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dropzone-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 8px;
}

.dropzone-text {
    font-size: 16px;
    color: var(--dr-navy);
    margin: 0 0 4px 0;
}

.dropzone-subtext {
    font-size: 12px;
    color: var(--dr-muted);
}

.file-preview-box {
    margin-top: 15px;
    background: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid var(--dr-border);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--dr-primary);
}

/* Security Notice */
.dr-rx-security-notice {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.dr-rx-security-notice .shield-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.dr-rx-security-notice p {
    font-size: 13px;
    color: #166534;
    margin: 0;
    line-height: 1.5;
}

/* Submit Button */
.dr-rx-submit-row {
    text-align: center;
}

.dr-rx-btn-submit {
    background: linear-gradient(135deg, var(--dr-primary) 0%, var(--dr-primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 40px;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 122, 83, 0.35);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.dr-rx-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 83, 0.45);
}

.dr-rx-message-box {
    margin-top: 25px;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.6;
}

.dr-rx-message-box.success {
    background: #ecfdf5;
    border: 1.5px solid #10b981;
    color: #065f46;
}

.dr-rx-message-box.error {
    background: #fef2f2;
    border: 1.5px solid #ef4444;
    color: #991b1b;
}

/* Rx Badges on Products */
.dr-rx-loop-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e60000;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.dr-rx-product-alert-box {
    background: #fff5f5;
    border: 1.5px solid #feb2b2;
    border-radius: 8px;
    padding: 14px 18px;
    display: flex;
    gap: 14px;
    margin: 15px 0;
    direction: rtl;
}

.dr-rx-product-alert-box .alert-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.dr-rx-product-alert-box strong {
    color: #c53030;
    font-size: 15px;
    display: block;
    margin-bottom: 4px;
}

.dr-rx-product-alert-box p {
    font-size: 13px;
    color: #4a5568;
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.dr-rx-inline-btn {
    display: inline-block;
    background: #c53030;
    color: #fff !important;
    font-size: 12px;
    font-weight: bold;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none !important;
    transition: background 0.2s;
}

.dr-rx-inline-btn:hover {
    background: #9b2c2c;
}

.dr-rx-specs-box {
    background: #f8fafc;
    border: 1px solid var(--dr-border);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0;
    font-size: 13px;
}

.dr-rx-specs-box .spec-row {
    margin-bottom: 6px;
}

.dr-rx-specs-box .spec-row:last-child {
    margin-bottom: 0;
}

.dr-rx-specs-box .spec-label {
    font-weight: 700;
    color: var(--dr-navy);
    margin-left: 6px;
}

/* Order Tracker */
.dr-tracker-container {
    max-width: 800px;
    margin: 30px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--dr-shadow);
    border: 1px solid var(--dr-border);
}

.dr-tracker-header {
    text-align: center;
    margin-bottom: 25px;
}

.dr-tracker-header .tracker-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 8px;
}

.dr-tracker-header h2 {
    font-size: 24px;
    color: var(--dr-navy);
    margin: 0 0 6px 0;
    font-weight: 800;
}

.tracker-inputs-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.tracker-input-box {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tracker-input-box label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.tracker-input-box input {
    padding: 12px;
    border: 1.5px solid var(--dr-border);
    border-radius: 6px;
    font-size: 15px;
}

.dr-tracker-btn {
    background: var(--dr-primary);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    height: 48px;
}

.dr-tracker-btn:hover {
    background: var(--dr-primary-dark);
}

.dr-progress-timeline {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    position: relative;
}

.dr-progress-timeline::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: #e2e8f0;
    z-index: 1;
}

.timeline-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px auto;
    font-weight: bold;
    font-size: 14px;
}

.step-label {
    font-size: 12px;
    color: var(--dr-muted);
    font-weight: 600;
}

.timeline-step.step-done .step-circle {
    background: var(--dr-primary);
}

.timeline-step.step-active .step-circle {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.timeline-step.step-done .step-label,
.timeline-step.step-active .step-label {
    color: var(--dr-navy);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--dr-border);
    padding-bottom: 15px;
}

.card-top h3 {
    margin: 0;
    font-size: 20px;
    color: var(--dr-navy);
}

.status-pill {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    background: var(--dr-primary-light);
    color: var(--dr-primary-dark);
}

.card-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 14px;
}

.card-support-prompt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0fdf4;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
}

.dr-btn-contact-support {
    background: #25d366;
    color: #fff !important;
    padding: 6px 16px;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 13px;
}

@media (max-width: 768px) {
    .dr-rx-form-grid,
    .tracker-inputs-row,
    .card-details-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
    .dr-rx-portal-container,
    .dr-tracker-container {
        padding: 20px 15px;
    }
}
