/* Delivery Scheduling - Frontend Styles */

.dm-scheduling-container {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.dm-scheduling-container h3 {
    color: #1f2937;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dm-scheduling-container .material-symbols-outlined {
    color: #3b82f6;
    font-size: 1.25rem;
}

.dm-scheduling-container label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    color: #374151;
}

.dm-scheduling-container input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    color: #3b82f6;
    border-color: #d1d5db;
}

.dm-scheduling-container input[type="radio"]:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.dm-scheduling-container input[type="date"],
.dm-scheduling-container input[type="time"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.dm-scheduling-container input[type="date"]:focus,
.dm-scheduling-container input[type="time"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dm-scheduling-container .text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

#dm-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

#dm-time-slots button {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

#dm-time-slots button:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
}

#dm-time-slots button.selected {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

#dm-time-slots button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#dm-scheduling-summary {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 1rem;
}

#dm-scheduling-summary p {
    margin: 0;
}

#dm-scheduling-summary .text-blue-800 {
    color: #1e40af;
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#dm-scheduling-summary .text-blue-700 {
    color: #1d4ed8;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

#dm-scheduling-summary .material-symbols-outlined {
    font-size: 1rem;
    color: #3b82f6;
}

/* Loading states */
.dm-scheduling-loading {
    opacity: 0.6;
    pointer-events: none;
}

.dm-scheduling-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: dm-spin 1s linear infinite;
}

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

/* Error states */
.dm-scheduling-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Success states */
.dm-scheduling-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #dm-time-slots {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .dm-scheduling-container {
        padding: 1rem;
    }
    
    .dm-scheduling-container h3 {
        font-size: 1.125rem;
    }
}

/* Integration with existing checkout styles */
.dm-scheduling-container {
    margin-bottom: 1.5rem;
}

.dm-scheduling-container + .dm-checkout-section {
    margin-top: 1.5rem;
}
