/**
 * Recology ReCollect Widget Styles
 */

/* ==========================================================================
   Search Interface
   ========================================================================== */

.recollect-calendar-wrapper {
    max-width: 980px;
    margin: 0 auto;
}

.rclc-wrap, .rclh-wrap {
    max-width: 720px;
    margin-top: 0;
    margin-right: auto;
    margin-bottom: 0;
    margin-left: auto;
}

.rclc-title {
    font-size: 1.5em;
    font-weight: 700;
    text-align: center;
    margin: 0 0 1rem;
    color: #333;
    font-family: 'Lato';
}

.rclc-input, .rclh-input {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    margin: 0.5rem 0;
}

.rclc-input:focus, .rclh-input:focus {
    outline: none;
    border-color: #59a343;
    box-shadow: 0 0 0 3px rgba(89, 163, 67, 0.1);
}

.rclh-results {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    overflow: hidden;
}

.rclh-results li {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.rclh-results li:last-child {
    border-bottom: none;
}

.rclh-results li:hover {
    background: #f5f5f5;
}

.rclc-muted {
    color: #666;
    font-size: 0.95rem;
}

/* Action Buttons */
.rclc-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
}

.rclc-btn {
    appearance: none;
    border: 1px solid #cfd3d7;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.rclc-btn:hover {
    background: #f9fafb;
    border-color: #59a343;
    color: #508527;
}

.rclc-btn:active {
    transform: scale(0.98);
}

/* ==========================================================================
   Widget Container
   ========================================================================== */

.recollect-calendar-container {
    max-width: 980px;
    margin: 1rem auto;
    text-align: center;
    min-height: 400px;
}

/* Override ReCollect's default "Search again" button since we handle it */
#rCw #rCbtn-search-again,
.recollect-calendar-container #rCbtn-search-again {
    display: none !important;
}

/* ==========================================================================
   Calendar Styling (ReCollect Widget Overrides)
   ========================================================================== */

.rCw {
    max-width: 980px;
    margin: 0 auto;
}

/* Title Bar */
.rCw .title-bar {
    padding: 24px;
    background: #fff;
    border-bottom: 2px solid #e9ecef;
    border-radius: 4px 4px 0 0;
}

.rCw .title-bar h1 {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px;
    line-height: 1.3;
}

.rCw .title-bar .buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

/* Clock Icon Fix */
.rCw .ri-clock.ri-white {
    background-position: -60px 0;
}

/* Calendar Container */
.rCw .calendar {
    border: 1px solid #dee2e6;
    margin-top: 20px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Day Headers (Sun, Mon, Tue...) */
.rCw .fc-day-header {
    background: #6c757d;
    color: #fff;
    padding: 12px 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Calendar Days */
.rCw .fc-day {
    border-color: #e9ecef;
    transition: background-color 0.2s ease;
}

.rCw .fc-day:hover {
    background-color: #f8f9fa !important;
}

/* Today Highlight */
.rCw .fc-today {
    background-color: #fffbea !important;
    border: 2px solid #ffc107 !important;
}

/* Day Numbers */
.rCw .fc-day-number {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    padding: 4px 8px;
}

/* ==========================================================================
   Debug Panel
   ========================================================================== */

.recollect-debug-panel {
    max-width: 980px;
    margin: 1.5rem auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    padding: 1rem;
    font-size: 0.9rem;
}

.recollect-debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.recollect-debug-clear {
    border: 1px solid #cfd3d7;
    background: #fff;
    border-radius: 4px;
    padding: 0.25rem 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
}

.recollect-debug-clear:hover {
    background: #f5f5f5;
}

.recollect-debug-content {
    max-height: 320px;
    overflow-y: auto;
    background: #fafafa;
    border: 1px solid #ededed;
    border-radius: 4px;
    padding: 0.75rem;
}

/* Collection Event Bars */
.rCw .fc-event {
    border: none !important;
    border-radius: 3px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.rCw .fc-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    opacity: 0.9;
}

/* Event Colors */
.rCw .fc-event[id*="garbage"] {
    background-color: #6c757d !important;
}

.rCw .fc-event[id*="recycling"] {
    background-color: #008ebf !important;
}

.rCw .fc-event[id*="organics"],
.rCw .fc-event[id*="yard"] {
    background-color: #78cc3e !important;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .rclc-wrap, .rclh-wrap {
        padding: 0 1rem;
    }
    
    .rclc-title {
        font-size: 22px;
    }
    
    .rCw .title-bar {
        padding: 16px;
    }
    
    .rCw .title-bar h1 {
        font-size: 18px;
    }
    
    .rCw .title-bar .buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .rCw .title-bar .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.rclc-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.rclc-loading::after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: ".";
    }
    40% {
        content: "..";
    }
    60%, 100% {
        content: "...";
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.rclc-input:focus,
.rclc-btn:focus {
    outline: 2px solid #59a343;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .rclc-btn,
    .rclh-results li,
    .rCw .fc-event,
    .rCw .fc-day {
        transition: none;
    }
}
