/* ------ Pharmacy orders ------ */

.medavin-pharmacy-orders {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.order-filters {
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 16px;
    margin-right: 10px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    cursor: pointer;
}

.filter-btn.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.orders-grid {
    /*
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    */
}

.order-card {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0;
    background: white;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.9em;
}

.status-badge.accepted { background: #ffd700; }
.status-badge.unavailable { background: #f8d7da; }
.status-badge.ready { background: #90ee90; }
.status-badge.sent { background: #87ceeb; }

.order-details {
    margin-bottom: 15px;
}

.order-details p {
    margin: 5px 0;
}

.order-actions {
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.price-field {
    margin-bottom: 10px;
}

.status-field {
    display: flex;
    gap: 10px;
}

.update-btn {
    padding: 8px 16px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.update-btn:hover {
    background: #005177;
}

.pagination {
    margin-top: 20px;
    text-align: center;
}
.status-badges {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.confirmation-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.confirmation-badge.confirmed {
    background: #d4edda;
    color: #155724;
}

.confirmation-badge.pending {
    background: #fff3cd;
    color: #856404;
}

/* ------ User orders ------ */

.medavin-my-orders {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.order-filters {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.order-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.order-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-title h3 {
    margin: 0;
    font-size: 1.2em;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.status-badge.accepted {
    background: #fff3cd;
    color: #856404;
}

.status-badge.unavailable {
    background: #f8d7da;
    color: #58151c;
}

.status-badge.ready {
    background: #d4edda;
    color: #155724;
}

.status-badge.sent {
    background: #cce5ff;
    color: #004085;
}

.status-badge.done {
    background: #eee;
    color: #333;
}

.order-date {
    color: #666;
    font-size: 0.9em;
}

.order-content {
    padding: 15px;
}

.order-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.order-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.order-section h4 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 1.1em;
}

.order-section p {
    margin: 5px 0;
    color: #666;
}

.order-section strong {
    color: #333;
}

.order-section .pharmacy_an {
    display: inline-block;
    direction: ltr;
}

.order-actions {
    text-align: center;
}

.action-button {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.action-button:hover {
    background: #005177;
}

.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination .page-numbers {
    padding: 5px 10px;
    margin: 0 2px;
    border: 1px solid #ddd;
    text-decoration: none;
    border-radius: 3px;
}

.pagination .current {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

@media (max-width: 768px) {
    .order-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-date {
        margin-top: 5px;
    }

    .filter-btn {
        flex: 1;
        text-align: center;
    }
}

/* ------ Custom order form ------ */

.order-wrap {
    background-color: #f8f9fa;
    min-height: calc(100vh - 100px);
}

.card {
    border-radius: 15px;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 30px;
}

.progress-steps::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 33.333%;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

/* Optional: Add smooth transition */
.form-step {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    height: 0;
    overflow: hidden;
}

.form-step.active {
    opacity: 1;
    height: auto;
    overflow: visible;
}

.step-icon {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    transition: all 0.3s ease;
}

.step.active .step-icon {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: #6c757d;
}

.step.active .step-label {
    color: var(--bs-primary);
    font-weight: 500;
}

/* Order Type Cards */
.order-type-card {
    position: relative;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.order-type-input {
    position: absolute;
    opacity: 0;
}

.order-type-label {
    display: block;
    cursor: pointer;
    margin: 0;
    padding: 20px;
    width: 100%;
    height: 100%;
}

.order-type-input:checked + .order-type-label {
    border-color: var(--bs-primary);
    background: rgba(0, 123, 255, 0.05);
}

/* Prescription Type Cards */
.prescription-type-card,
.delivery-type-card,
.pharmacy-card {
    position: relative;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.prescription-type-input,
.delivery-type-input,
.pharmacy-input {
    position: absolute;
    opacity: 0;
}

.prescription-type-label,
.delivery-type-label,
.pharmacy-label {
    display: block;
    cursor: pointer;
    margin: 0;
    padding: 20px;
    width: 100%;
    height: 100%;
}

.icon-wrapper {
    font-size: 2rem;
    color: var(--bs-primary);
    margin-bottom: 15px;
}

.prescription-type-input:checked + .prescription-type-label,
.delivery-type-input:checked + .delivery-type-label,
.pharmacy-input:checked + .pharmacy-label {
    border-color: var(--bs-primary);
    background: rgba(0, 123, 255, 0.05);
}

/* Pharmacy Cards */
.pharmacy-card {
    background: white;
    overflow: hidden;
}

.pharmacy-info {
    font-size: 0.875rem;
    color: #6c757d;
}

.pharmacy-info i {
    width: 20px;
}

/* Form Controls */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}

/* Preview Image */
#prescription-preview {
    max-height: 200px;
    width: auto;
}

.otc-order-fields .container {
    padding-right: 0;
    padding-left: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .step-label {
        font-size: 0.75rem;
    }
    
    .progress-steps::before {
        top: 15px;
    }
    
    .step-icon {
        width: 30px;
        height: 30px;
        font-size: 0.875rem;
    }
}

/* ------ Custom Medavin pages ------ */

/* Profile Page Styles */
.profile-page {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.profile-nav .nav-link {
    color: #495057;
    padding: 1rem 1.5rem;
    border-left: 3px solid transparent;
}

.profile-nav .nav-link:hover {
    background-color: #f8f9fa;
}

.profile-nav .nav-link.active {
    color: var(--bs-primary);
    background-color: #f8f9fa;
    border-left-color: var(--bs-primary);
}

.address-card {
    transition: transform 0.3s ease;
}

.address-card:hover {
    transform: translateY(-5px);
}

.table td, .table th {
    vertical-align: middle;
}

/* Badge Colors */
.badge.bg-accepted { background-color: #ffc107 !important; }
.badge.bg-price_announced { background-color: #17a2b8 !important; }
.badge.bg-ready { background-color: #28a745 !important; }
.badge.bg-sent { background-color: #007bff !important; }

/* Form Styles */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .profile-nav {
        margin-bottom: 1rem;
    }
    
    .profile-nav .nav-link {
        border-left: none;
        border-left-width: 0;
        border-radius: 0.25rem;
    }
    
    .profile-nav .nav-link.active {
        background-color: var(--bs-primary);
        color: white;
    }
}

/* Pharmacy Profile Styles */
.pharmacy-profile {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.pharmacy-logo img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.stats-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.pharmacy-nav .nav-link {
    color: #495057;
    padding: 1rem 1.5rem;
    border-left: 3px solid transparent;
}

.pharmacy-nav .nav-link:hover {
    background-color: #f8f9fa;
}

.pharmacy-nav .nav-link.active {
    color: var(--bs-primary);
    background-color: #f8f9fa;
    border-left-color: var(--bs-primary);
}

.schedule-row .time-separator {
    line-height: 38px;
}

/* Status Colors */
.badge.bg-accepted { background-color: #ffc107 !important; }
.badge.bg-price_announced { background-color: #17a2b8 !important; }
.badge.bg-ready { background-color: #28a745 !important; }
.badge.bg-sent { background-color: #007bff !important; }

@media (max-width: 768px) {
    .pharmacy-nav {
        margin-bottom: 1rem;
    }
    
    .pharmacy-nav .nav-link {
        border-left: none;
        border-radius: 0.25rem;
    }
    
    .pharmacy-nav .nav-link.active {
        background-color: var(--bs-primary);
        color: white;
    }
}

