/* Main Styles for Agendamento System */

:root {
    --primary: #8B5CF6; /* Purple 600 */
    --primary-dark: #7C3AED; /* Purple 700 */
    --primary-light: #A78BFA; /* Purple 400 */
    --secondary: #EC4899; /* Pink 500 */
    --accent: #F59E0B; /* Yellow 500 */
    --success: #10B981; /* Green 500 */
    --danger: #EF4444; /* Red 500 */
    --gray-light: #F9FAFB; /* Gray 50 */
    --gray: #E5E7EB; /* Gray 200 */
    --gray-dark: #6B7280; /* Gray 500 */
    --text: #1F2937; /* Gray 800 */
}

/* Calendar Customization */
.fc-theme-standard .fc-toolbar {
    background-color: var(--primary);
    color: white;
    padding: 1.25rem;
    border-radius: 1rem 1rem 0 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.fc-theme-standard .fc-toolbar-title {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.fc-theme-standard .fc-button-primary {
    background-color: transparent;
    border-color: transparent;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.fc-theme-standard .fc-button-primary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: transparent;
    transform: translateY(-1px);
}

.fc-theme-standard .fc-button-active {
    background-color: rgba(255, 255, 255, 0.3) !important;
    border-color: transparent !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fc-theme-standard .fc-daygrid-day.fc-day-today {
    background-color: rgba(139, 92, 246, 0.15);
}

.fc-theme-standard .fc-daygrid-day-frame {
    min-height: 100px;
    padding: 4px;
}

.fc-theme-standard .fc-daygrid-day-number {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    padding: 4px 8px;
}

.fc-theme-standard .fc-day-sat .fc-daygrid-day-number,
.fc-theme-standard .fc-day-sun .fc-daygrid-day-number {
    color: var(--primary);
}

.fc-theme-standard .fc-event {
    background-color: var(--primary);
    border-color: var(--primary-dark);
    border-radius: 0.5rem;
    padding: 0.35rem 0.5rem;
    margin: 2px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fc-theme-standard .fc-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.fc-theme-standard .fc-event-time {
    font-weight: 600;
    font-size: 0.85rem;
}

.fc-theme-standard .fc-event-title {
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray);
    border-radius: 0.375rem;
    background-color: white;
    color: var(--text);
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.form-select {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid var(--gray);
    border-radius: 0.375rem;
    background-color: white;
    color: var(--text);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Card Styles */
.card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: var(--primary);
    color: white;
    padding: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 1.25rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.375rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    cursor: pointer;
}

.btn-primary {
    color: white;
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    color: white;
    background-color: var(--secondary);
    border-color: var(--secondary);
}

.btn-secondary:hover {
    background-color: #DB2777; /* Pink 600 */
    border-color: #DB2777;
}

.btn-accent {
    color: white;
    background-color: var(--accent);
    border-color: var(--accent);
}

.btn-accent:hover {
    background-color: #D97706; /* Yellow 600 */
    border-color: #D97706;
}

.btn-success {
    color: white;
    background-color: var(--success);
    border-color: var(--success);
}

.btn-success:hover {
    background-color: #059669; /* Green 600 */
    border-color: #059669;
}

.btn-danger {
    color: white;
    background-color: var(--danger);
    border-color: var(--danger);
}

.btn-danger:hover {
    background-color: #DC2626; /* Red 600 */
    border-color: #DC2626;
}

/* Responsive Adjustments */
/* Base mobile-first styles */
html {
    font-size: 16px;
}

body {
    overflow-x: hidden;
    width: 100%;
}

.container {
    width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    margin: 0 auto;
    max-width: 1280px;
}

/* Small devices (phones, up to 576px) */
@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .form-control, .form-select {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }
    
    .modal {
        max-width: 95%;
    }
    
    .calendar-day {
        min-height: 80px;
    }
    
    .calendar-event {
        padding: 0.15rem 0.3rem;
        font-size: 0.7rem;
    }
}

/* Medium devices (tablets, 577px to 768px) */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    header nav ul {
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        background-color: var(--primary);
        padding: 1rem;
        border-radius: 0 0 0.5rem 0.5rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        z-index: 50;
        display: none;
        width: 200px;
    }
    
    header nav ul.show {
        display: flex;
    }
    
    header nav ul li {
        margin: 0.5rem 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .card-header {
        padding: 0.75rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
    z-index: 60;
    position: relative;
}

.mobile-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    header nav ul {
        position: fixed;
        top: 0;
        right: -250px;
        width: 250px;
        height: 100vh;
        background-color: var(--primary-dark);
        flex-direction: column;
        padding: 5rem 1.5rem 2rem;
        transition: right 0.3s ease;
        z-index: 50;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    header nav ul.show {
        right: 0;
    }
    
    header nav ul li {
        margin: 0.75rem 0;
        width: 100%;
    }
    
    header nav ul li a {
        display: block;
        padding: 0.5rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Appointment Styles */
.appointment-item {
    border-left: 4px solid var(--primary);
    padding: 0.75rem 1rem;
    background-color: white;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    margin-bottom: 0.75rem;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.appointment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.appointment-item.pink {
    border-left-color: var(--secondary);
}

.appointment-item.yellow {
    border-left-color: var(--accent);
}

.appointment-item.green {
    border-left-color: var(--success);
}

.appointment-time {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.875rem;
}

.appointment-client {
    font-weight: 500;
    color: var(--text);
    margin: 0.25rem 0;
}

.appointment-service {
    color: var(--gray-dark);
    font-size: 0.875rem;
}

.appointment-price {
    font-weight: 600;
    color: var(--text);
    margin-top: 0.25rem;
}

/* Calendar Day Styles */
.calendar-day {
    position: relative;
    min-height: 120px;
    background-color: white;
    border: 1px solid var(--gray);
}

.calendar-day-header {
    text-align: center;
    padding: 0.5rem;
    font-weight: 500;
    border-bottom: 1px solid var(--gray);
}

.calendar-day.today .calendar-day-header {
    background-color: var(--primary);
    color: white;
}

.calendar-day.other-month {
    background-color: var(--gray-light);
}

.calendar-event {
    margin: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.calendar-event.purple {
    background-color: rgba(139, 92, 246, 0.2);
    color: var(--primary-dark);
}

.calendar-event.pink {
    background-color: rgba(236, 72, 153, 0.2);
    color: #DB2777; /* Pink 600 */
}

.calendar-event.yellow {
    background-color: rgba(245, 158, 11, 0.2);
    color: #D97706; /* Yellow 600 */
}

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal {
    background-color: white;
    border-radius: 0.5rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

@media (max-width: 576px) {
    .modal {
        width: 95%;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 0.75rem;
    }
    
    .modal-body {
        padding: 0.75rem;
    }
    
    .modal-footer {
        padding: 0.75rem;
        flex-wrap: wrap;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
}

.modal-header {
    background-color: var(--primary);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 1rem;
}

.modal-footer {
    padding: 1rem;
    background-color: var(--gray-light);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}