/**
 * Quote Request Plugin Styles
 * Frontend styles for project lists, appointments, and quote forms
 */

/* Project List Styles */
.project-list-widget {
    position: relative;
}

.project-list-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.add-to-project-list {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mini-project-list {
    position: relative;
    margin-left: 0;
}

.mini-project-list-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 300px;
    max-width: 400px;
    z-index: 1000;
    display: none;
}

.mini-project-list:hover .mini-project-list-dropdown {
    display: block;
}

.mini-project-list-item {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-project-list-item:last-child {
    border-bottom: none;
}

.mini-project-list-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.mini-project-list-footer {
    padding: 15px;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Appointment Booking Styles */
.appointment-booking-form {
    max-width: 800px;
    margin: 0 auto;
}

.time-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.time-slot {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.time-slot:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.time-slot.selected {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

.time-slot.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.appointment-type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.appointment-type-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.appointment-type-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0,123,255,0.2);
}

.appointment-type-card.selected {
    border-color: #007bff;
    background: #f0f8ff;
}

.appointment-type-card i {
    font-size: 32px;
    margin-bottom: 10px;
    color: #007bff;
}

/* Project List Cards */
.project-list-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
    height: 100%;
}

.project-list-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.project-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.project-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Quote Form Styles */
.quote-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.quote-form-field {
    margin-bottom: 20px;
}

.quote-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.quote-form-field input,
.quote-form-field textarea,
.quote-form-field select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.quote-form-field input:focus,
.quote-form-field textarea:focus,
.quote-form-field select:focus {
    outline: none;
    border-color: #007bff;
}

.quote-form-field.required label::after {
    content: ' *';
    color: #dc3545;
}

.quote-form-submit {
    width: 100%;
    padding: 14px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.quote-form-submit:hover {
    background: #0056b3;
}

/* Calendar Styles */
#calendar {
    max-width: 100%;
    margin: 0 auto;
}

.fc-event {
    cursor: pointer;
    border-radius: 4px;
    padding: 2px 5px;
}

.fc-event:hover {
    opacity: 0.85;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .project-list-card {
        margin-bottom: 20px;
    }
    
    .mini-project-list-dropdown {
        min-width: 280px;
        right: -50px;
    }
    
    .appointment-type-selector {
        grid-template-columns: 1fr;
    }
    
    .time-slot-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .quote-form-container {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .project-actions {
        flex-direction: column;
    }
    
    .project-actions .btn {
        width: 100%;
    }
    
    .mini-project-list-dropdown {
        right: 0;
        left: auto;
        min-width: 100vw;
    }
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

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

.status-completed {
    background: #d6d8db;
    color: #383d41;
}

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

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #666;
    margin-bottom: 10px;
}

.empty-state p {
    color: #999;
    margin-bottom: 20px;
}

/* Notification Styles */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

/* Availability Status */
.availability-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.availability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.availability-dot.in-stock {
    background: #28a745;
}

.availability-dot.partial {
    background: #ffc107;
}

.availability-dot.out-of-stock {
    background: #dc3545;
}

.availability-dot.backorder {
    background: #17a2b8;
}
