/**
 * View Prescription Modal CSS
 * Styling for the view prescription modal
 */

.prescription-view-content {
    padding: 20px 0;
}

.prescription-loading {
    text-align: center;
    padding: 40px 20px;
}

.prescription-loading i {
    color: #0e82fd;
    margin-bottom: 15px;
}

.prescription-view-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.prescription-header h4 {
    color: #0e82fd;
    margin-bottom: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

.prescription-info {
    margin-top: 20px;
}

.info-group {
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-group:last-child {
    border-bottom: none;
}

.prescription-view-details .section-title {
    color: #0e82fd;
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #0e82fd;
}

.patient-section, .medical-section, .medication-section {
    margin-bottom: 0;
}

.info-group label {
    display: block;
    margin-bottom: 5px;
    color: #495057;
    font-weight: 500;
}

.info-group p {
    margin: 0;
    color: #212529;
    font-size: 14px;
}

.medicine-table {
    margin-top: 10px;
    font-size: 14px;
}

.medicine-table th {
    background-color: #0e82fd !important;
    color: #fff !important;
    font-weight: 600;
    text-align: center;
    padding: 12px 8px !important;
    border: 1px solid #0e82fd;
}

.medicine-table td {
    padding: 10px 8px;
    border: 1px solid #dee2e6;
    vertical-align: middle;
    text-align: center;
}

.medicine-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.medicine-table tbody tr:hover {
    background-color: #e9ecef;
}

.medicine-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.medicine-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    color: #212529;
    font-size: 14px;
}

.medicine-list li:last-child {
    border-bottom: none;
}

.medicine-list li:before {
    content: "•";
    color: #0e82fd;
    font-weight: bold;
    margin-right: 8px;
}

.view-prescription-btn {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: #fff !important;
    margin-left: 10px;
}

.view-prescription-btn:hover {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
    color: #fff !important;
}

/* RTL Support */
.rtl .medicine-list li:before {
    margin-right: 0;
    margin-left: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .prescription-view-details {
        padding: 15px;
    }
    
    .prescription-header h4 {
        font-size: 16px;
    }
    
    .info-group {
        margin-bottom: 12px;
    }
    
    .view-prescription-btn {
        margin-left: 5px;
        margin-top: 5px;
    }
    
    .medicine-table {
        font-size: 12px;
    }
    
    .medicine-table th,
    .medicine-table td {
        padding: 8px 4px;
    }
    
    .prescription-view-details .section-title {
        font-size: 14px;
    }
}

/* Loading Animation */
.prescription-loading .fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* Modal Size */
#view_prescription_modal .modal-dialog {
    max-width: 800px;
}

/* Button Spacing */
.dc-pdfbtn + .view-prescription-btn {
    margin-left: 10px;
}

/* Error Messages */
.prescription-details .alert {
    border-radius: 8px;
    margin-bottom: 0;
}

.prescription-details .alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.prescription-details .alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* Modal Footer and Action Buttons */
.dc-modal-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.prescription-actions {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dc-printbtn.print-prescription {
    background-color: #17a2b8 !important;
    border-color: #17a2b8 !important;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.print-prescription:hover {
    background-color: #138496 !important;
    border-color: #117a8b !important;
    color: #fff !important;
    transform: translateY(-1px);
}

.prescription-actions i {
    margin-right: 8px;
}

/* RTL Support for Action Buttons */
.rtl .prescription-actions i {
    margin-right: 0;
    margin-left: 8px;
}

/* Responsive Design for Action Buttons */
@media (max-width: 768px) {
    .prescription-actions {
        flex-direction: column;
    }
    
    .print-prescription {
        width: 100%;
        padding: 12px 20px;
        color: #fff !important;
    }
    
    .dc-modal-footer {
        padding: 15px;
    }
}
