/* Order Now Elementor Widget Styles */

/* Main Button Styles */
.order-now-button {
    padding: 12px 24px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    background-color: var(--order-now-primary-color, #007cba);
    color: var(--order-now-secondary-color, #ffffff);
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.4;
}

.order-now-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

.order-now-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Button Sizes */
.order-now-button-small {
    padding: 8px 16px;
    font-size: 12px;
}

.order-now-button-medium {
    padding: 12px 24px;
    font-size: 14px;
}

.order-now-button-large {
    padding: 16px 32px;
    font-size: 16px;
}

/* Overlay */
.order-now-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.order-now-overlay.active {
    display: block;
    opacity: 1;
}

/* Sidebar */
.order-now-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background-color: #ffffff;
    z-index: 9999;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.order-now-sidebar.active {
    right: 0;
}

.order-now-sidebar-content {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.order-now-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    background-color: #f8f9fa;
}

.order-now-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.order-now-close:hover {
    background-color: #e9ecef;
    color: #333;
}

/* Tabs */
.order-now-tabs {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.order-now-tab-buttons {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
}

.order-now-tab-button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    color: #666;
    border-bottom: 3px solid transparent;
}

.order-now-tab-button:hover {
    background-color: #e9ecef;
    color: #333;
}

.order-now-tab-button.active {
    color: var(--order-now-primary-color, #007cba);
    border-bottom-color: var(--order-now-primary-color, #007cba);
    background-color: #ffffff;
}

/* Tab Content */
.order-now-tab-content {
    flex: 1;
    position: relative;
}

.order-now-tab-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.order-now-tab-panel.active {
    opacity: 1;
    visibility: visible;
}

/* Order Tab Styles */
.order-now-order-content {
    padding: 20px;
}

.order-links-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-link {
    display: block;
    padding: 15px 20px;
    background-color: var(--order-now-primary-color, #007cba);
    color: var(--order-now-secondary-color, #ffffff);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
}

.order-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0.9;
    color: var(--order-now-secondary-color, #ffffff);
    text-decoration: none;
}

/* Pharmacy Tab Styles */
.order-now-pharmacy-content {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pharmacy-search {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.pharmacy-search input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

.pharmacy-search button {
    padding: 8px 16px;
    border: none;
    background-color: var(--order-now-primary-color, #007cba);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.pharmacy-search button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

#pharmacy-geolocate-button {
    background-color: #28a745;
}

/* Map Styles */
.pharmacy-map {
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #f0f0f0;
    position: relative;
}

.pharmacy-map .loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
}

/* Pharmacy List */
.pharmacy-list {
    flex: 1;
    overflow-y: auto;
}

.pharmacy-item {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pharmacy-item:hover {
    border-color: var(--order-now-primary-color, #007cba);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pharmacy-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 16px;
}

.pharmacy-address {
    color: #666;
    margin-bottom: 8px;
    font-size: 14px;
}

.pharmacy-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.pharmacy-rating .stars {
    color: #ffc107;
}

.pharmacy-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 5px;
}

.pharmacy-status.open {
    background-color: #d4edda;
    color: #155724;
}

.pharmacy-status.closed {
    background-color: #f8d7da;
    color: #721c24;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--order-now-primary-color, #007cba);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .order-now-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .order-now-tab-button {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .pharmacy-map {
        height: 200px;
    }
}

/* Custom scrollbar for sidebar */
.order-now-sidebar::-webkit-scrollbar {
    width: 6px;
}

.order-now-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.order-now-sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.order-now-sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Styles for when only pharmacy tab is visible */
.order-now-tabs:not(:has(.order-now-tab-buttons *)) .order-now-tab-buttons,
.order-now-tabs .order-now-tab-buttons:empty {
    display: none;
}

/* Ensure pharmacy tab content takes full height when tabs are hidden */
.order-now-tabs:not(:has(.order-now-tab-buttons *)) .order-now-tab-content,
.order-now-tabs:has(.order-now-tab-buttons:empty) .order-now-tab-content {
    height: calc(100vh - 60px); /* Subtract header height */
}

.order-now-tabs:not(:has(.order-now-tab-buttons *)) .order-now-tab-panel,
.order-now-tabs:has(.order-now-tab-buttons:empty) .order-now-tab-panel {
    position: static;
    height: 100%;
    opacity: 1;
    visibility: visible;
} 