/**
 * Santa Cruz Blues Calendar - Minimal Clean Style
 * Version: 1.9.3
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Alumni+Sans+Pinstripe:ital@0;1&display=swap');

/* Color Palette - MNBS-Inspired Minimal */
:root {
    --primary-blue: #497895;
    --accent-blue: #89bce1;
    --dark-gray: #2c3138;
    --medium-gray: #7a7575;
    --light-gray: #f5f5f5;
    --border-light: #e0e0e0;
    --text-primary: #333333;
    --text-secondary: #666666;
    --event-blue: #497895;
    --shadow-subtle: 6px 6px 9px rgba(0, 0, 0, 0.2);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    color: var(--text-primary);
    line-height: 1.6;
}

main {
    flex: 1;
    padding: 2rem 0;
}

/* Header Styles */
header {
    background: var(--dark-gray) !important;
    border-bottom: 1px solid var(--border-light);
}

header h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: white;
}

header p.small {
    opacity: 0.9;
    font-weight: 300;
    color: white;
}

header .btn {
    border-radius: 4px;
    padding: 0.5rem 1.25rem;
    font-weight: 400;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

header .btn-light {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

header .btn-light:hover {
    background: var(--light-gray);
}

header .btn-outline-light {
    border: 1px solid white;
    background: transparent;
    color: white;
}

header .btn-outline-light:hover {
    background: white;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.75rem;
    }

    header .col-md-4 {
        text-align: center !important;
        margin-top: 1rem;
    }
}

/* Search Card */
.search-card {
    background: white;
    margin-bottom: 1.5rem;
}

.search-card .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.search-card .form-label i {
    color: var(--primary-blue);
}

/* Calendar Container */
.calendar-card {
    background: white;
}

.calendar-card .card-body {
    padding: 0;
}

#calendar {
    background: white;
    padding: 2rem;
    min-height: 600px;
}

/* FullCalendar Customization */
.fc {
    font-family: 'Poppins', sans-serif;
}

.fc-toolbar-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--deep-blue);
    font-size: 2rem !important;
}

.fc-button {
    background: var(--primary-blue) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0.6rem 1.2rem !important;
    font-weight: 600 !important;
    color: white !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all 0.3s ease !important;
}

.fc-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-md) !important;
    background: var(--deep-blue) !important;
}

.fc-button:disabled {
    opacity: 0.5 !important;
}

.fc-button-active {
    background: var(--deep-blue) !important;
}

.fc-event {
    cursor: pointer;
    border: none !important;
    background: var(--primary-blue) !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
    font-weight: 600 !important;
    color: white !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all 0.3s ease !important;
}

.fc-event:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md) !important;
    background: var(--deep-blue) !important;
}

.fc-event-title {
    color: white !important;
    font-weight: 600 !important;
}

.fc-event-time {
    color: rgba(255, 255, 255, 0.95) !important;
}

.fc-daygrid-day-number {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 8px;
}

.fc-col-header-cell-cushion {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

.fc-day-today {
    background: rgba(37, 99, 235, 0.1) !important;
}

.fc-day-today .fc-daygrid-day-number {
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-daygrid-day-frame {
    min-height: 120px;
}

/* List View Styling */
.fc-list-event {
    cursor: pointer;
    transition: all 0.2s ease;
}

.fc-list-event:hover {
    background: rgba(37, 99, 235, 0.05) !important;
}

.fc-list-event-title {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
}

.fc-list-event-time {
    color: var(--primary-blue) !important;
    font-weight: 600 !important;
}

.fc-list-day-cushion {
    background: var(--primary-blue) !important;
    color: white !important;
    padding: 1rem !important;
    font-weight: 600 !important;
}

.fc-list-event-dot {
    border-color: var(--primary-blue) !important;
}

.fc-list-empty {
    background: white;
    padding: 3rem;
    text-align: center;
    color: var(--text-secondary);
}

/* Card Styles */
.card {
    border: 1px solid var(--border-light);
    border-radius: 4px;
    box-shadow: none;
    background: white;
    overflow: hidden;
    transition: none;
}

.card:hover {
    transform: none;
    box-shadow: none;
}

.card-body {
    padding: 1.5rem;
    color: var(--text-primary);
}

.card-body h1,
.card-body h2,
.card-body h3,
.card-body h4,
.card-body h5,
.card-body h6,
.card-body p,
.card-body strong,
.card-body a {
    color: var(--text-primary);
}

.card-body a {
    color: var(--primary-blue);
    text-decoration: none;
}

.card-body a:hover {
    text-decoration: underline;
}

/* Form Styles */
.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control,
.form-select {
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 0.6rem 0.85rem;
    transition: border-color 0.2s ease;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: none;
    outline: none;
}

textarea.form-control {
    resize: vertical;
}

/* Button Styles - Minimal */
.btn {
    border-radius: 4px;
    padding: 0.6rem 1.25rem;
    font-weight: 400;
    font-size: 0.9rem;
    transition: background 0.2s ease;
    border: 1px solid var(--border-light);
    font-family: 'Roboto', sans-serif;
}

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

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

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

.btn-success:hover {
    background: #4cae4c;
    border-color: #4cae4c;
    color: white;
}

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

.btn-danger:hover {
    background: #c9302c;
    border-color: #c9302c;
    color: white;
}

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

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

.btn-outline-primary {
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    background: white;
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    color: white;
}

.btn-outline-secondary {
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    background: white;
}

.btn-outline-secondary:hover {
    background: var(--light-gray);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:focus {
    box-shadow: none;
    outline: none;
}

/* Admin Dashboard Styles */
.nav-tabs {
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 2rem;
}

.nav-tabs .nav-link {
    color: var(--text-secondary);
    font-weight: 400;
    border: none;
    border-radius: 4px 4px 0 0;
    padding: 0.75rem 1.5rem;
    transition: background 0.2s ease;
}

.nav-tabs .nav-link:hover {
    background: var(--light-gray);
}

.nav-tabs .nav-link.active {
    color: var(--primary-blue);
    font-weight: 500;
    background: white;
    border-bottom: 2px solid var(--primary-blue);
}

.badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-weight: 500;
}

.bg-warning {
    background: #f0ad4e !important;
    color: white !important;
}

/* Event Cards in Admin */
.card.mb-3 {
    transition: none;
    border-left: none;
}

.admin-event-card .btn {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
}

.admin-event-card .btn-success {
    background: #5cb85c !important;
    color: white !important;
    border-color: #5cb85c !important;
}

.admin-event-card .btn-danger {
    background: #d9534f !important;
    color: white !important;
    border-color: #d9534f !important;
}

.admin-event-card .btn-primary {
    background: #497895 !important;
    color: white !important;
    border-color: #497895 !important;
}

.admin-actions {
    display: block !important;
}

.admin-actions button {
    display: block !important;
    width: 100% !important;
}

/* Modal Styles - Minimal */
.modal-content {
    border: 1px solid var(--border-light);
    border-radius: 4px;
    box-shadow: var(--shadow-subtle);
}

.modal-header {
    background: white;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
    background: white;
    color: var(--text-primary);
}

.modal-body h4,
.modal-body h5,
.modal-body h6,
.modal-body p,
.modal-body strong {
    color: var(--text-primary);
}

.modal-footer {
    border-top: 1px solid var(--border-light);
    padding: 1rem 1.5rem;
    background: white;
}

.btn-close {
    filter: none;
}

/* Footer Styles */
footer {
    margin-top: auto;
    background: var(--dark-bg) !important;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

footer p {
    margin: 0.25rem 0;
}

/* Alert Styles - Minimal */
.alert {
    border-radius: 4px;
    border: 1px solid;
    box-shadow: none;
    padding: 1rem 1.25rem;
}

.alert-success {
    background: #dff0d8;
    border-color: #d6e9c6;
    color: #3c763d;
}

.alert-danger {
    background: #f2dede;
    border-color: #ebccd1;
    color: #a94442;
}

.alert-info {
    background: #d9edf7;
    border-color: #bce8f1;
    color: #31708f;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Social Share Buttons */
.btn-group .btn {
    margin-right: 0.5rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Loading States */
.spinner-border {
    color: var(--primary-blue);
}

/* Print Styles */
@media print {
    header,
    footer,
    .btn,
    .modal {
        display: none !important;
    }

    body {
        background: white;
    }

    #calendar {
        box-shadow: none;
    }
}

/* Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 3px solid rgba(37, 99, 235, 0.3);
    outline-offset: 2px;
}

/* iOS Safari Specific Fixes */
@supports (-webkit-touch-callout: none) {
    input[type="datetime-local"] {
        -webkit-appearance: none;
    }
}

/* Container Customization */
.container {
    max-width: 1400px;
}

.container-fluid {
    padding-left: 2rem;
    padding-right: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    html {
        overflow-x: hidden;
        max-width: 100%;
    }

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

    .container-fluid {
        padding-left: 0;
        padding-right: 0;
        max-width: 100%;
        overflow-x: hidden;
    }

    main.calendar-main {
        padding: 0.5rem 0;
        overflow-x: hidden;
        max-width: 100%;
    }

    #agendaView,
    #pinboardView {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .calendar-toolbar {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .view-toggle {
        margin-left: 0 !important;
    }

    .calendar-header .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Login Page Specific */
body.bg-light {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Admin Dashboard Header */
.bg-dark.text-white.py-3 {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}

/* Image Preview and Rotation */
.image-preview-wrapper {
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 1rem;
    background: var(--light-gray);
    text-align: center;
}

#imagePreview {
    transition: transform 0.3s ease;
    display: inline-block;
}

.image-rotation-controls {
    text-align: center;
}

.image-rotation-controls .btn-group {
    box-shadow: none;
}

/* ========================================
   TOCKIFY-STYLE CALENDAR LAYOUT
   ======================================== */

/* Calendar Header */
.calendar-header {
    background: var(--dark-gray) !important;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

.calendar-header h1 {
    font-family: "Alumni Sans Pinstripe", sans-serif;
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: none;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .calendar-header h1 {
        font-size: 1.75rem;
        line-height: 1.1;
        letter-spacing: 0;
    }
}

.header-logo {
    max-height: 150px;
    height: auto;
    max-width: 500px;
    object-fit: contain;
    margin-right: 1.5rem;
}

/* Calendar Main Area */
.calendar-main {
    background: #ffffff;
    min-height: calc(100vh - 200px);
    padding: 3rem 0;
}

/* Toolbar */
.calendar-toolbar {
    background: transparent;
    padding: 0 0 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.view-toggle .btn {
    font-weight: 400;
    font-size: 0.9rem;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    background: white;
    padding: 0.5rem 1.25rem;
}

.view-toggle .btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.view-toggle .btn:focus {
    box-shadow: none;
    outline: none;
}

.view-toggle .btn:hover:not(.active) {
    background: var(--light-gray);
    border-color: var(--border-light);
}

/* Search Options Box */
.search-options-box .card {
    border: 1px solid var(--border-light);
    background: white;
    box-shadow: none;
}

/* Calendar Views */
.calendar-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.calendar-view.active {
    display: block;
}

/* ========================================
   PINBOARD VIEW (Default - Card Grid) - Minimal
   ======================================== */

.event-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: none;
    transition: border-color 0.2s ease;
    cursor: pointer;
    height: 100%;
    position: relative;
}

.event-card:hover {
    border-color: var(--primary-blue);
}

.event-date-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-blue);
    color: white;
    border-radius: 3px;
    text-align: center;
    padding: 6px;
    min-width: 50px;
    z-index: 10;
}

.badge-month {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.event-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: var(--light-gray);
}

.event-image.no-image {
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-image.no-image::after {
    content: "\f5c4";
    font-family: "bootstrap-icons";
    font-size: 2.5rem;
    color: #ccc;
}

.event-card-body {
    padding: 1rem;
}

.event-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.event-venue,
.event-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.event-venue i,
.event-time i {
    color: var(--primary-blue);
    margin-right: 0.25rem;
}

/* ========================================
   AGENDA VIEW (List Format) - Minimal
   ======================================== */

.agenda-date-header {
    background: white;
    color: var(--text-primary);
    padding: 0.75rem 0 0 0;
    font-family: "Alumni Sans Pinstripe", sans-serif;
    font-weight: 700;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
    margin-top: 2rem;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.agenda-date-header:first-child {
    margin-top: 0;
}

.agenda-event {
    background: white;
    padding: 1rem 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.2s ease;
}

.agenda-event:hover {
    background: var(--light-gray);
}

.agenda-time {
    font-weight: 500;
    color: var(--primary-blue);
    font-size: 1rem;
    min-width: 100px;
}

.agenda-event h6 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 1rem;
}

.agenda-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: contain;
    border-radius: 4px;
    border: none;
}

.agenda-thumbnail-placeholder {
    width: 80px;
    height: 60px;
    background: var(--light-gray);
    border-radius: 4px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.5rem;
}

/* ========================================
   MONTHLY VIEW (Calendar Grid) - Minimal Clean Style
   ======================================== */

.calendar-monthly {
    background: white;
    padding: 0;
}

@media (max-width: 768px) {
    .calendar-monthly {
        overflow-x: hidden;
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .calendar-grid {
        width: 100% !important;
        max-width: 100% !important;
        gap: 0 !important;
        row-gap: 4px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        border: none !important;
        background: white !important;
        padding: 0 !important;
        margin-top: 0 !important;
    }

    .calendar-day-header {
        font-size: 0.45rem;
        padding: 0;
        margin-left: 0 !important;
        box-sizing: border-box;
        border: none;
        text-align: center;
    }

    .month-header {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    .calendar-day {
        min-height: 45px;
        padding: 0.15rem 0.05rem;
        margin-left: 0 !important;
        box-sizing: border-box;
        border: none !important;
        border-top: 1px solid var(--border-light) !important;
    }

    .day-number {
        font-size: 0.5rem;
        margin-bottom: 0.05rem;
    }

    .day-event {
        font-size: 0.38rem;
        padding: 0.08rem 0.1rem;
        margin-bottom: 0.03rem;
        border-left-width: 1px;
    }

    .event-name {
        font-size: 0.38rem;
        margin-bottom: 0;
    }

    .event-details {
        font-size: 0.32rem;
        line-height: 0.85;
    }

    .month-header h4 {
        font-size: 0.9rem;
    }

    .month-header .btn {
        font-size: 0.6rem;
        padding: 0.1rem 0.25rem;
    }

    .calendar-toolbar {
        padding: 0 0 1rem 0;
        margin-bottom: 1rem;
    }

    .view-toggle .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}

.month-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0;
    border-bottom: none;
}

.month-header h4 {
    margin: 0;
    font-family: "Alumni Sans Pinstripe", sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 2rem;
    letter-spacing: 0.5px;
    text-transform: none;
}

.month-header .btn {
    border: 1px solid var(--border-light);
    background: white;
    color: var(--text-secondary);
}

.month-header .btn:hover {
    background: var(--light-gray);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    row-gap: 8px;
}

.calendar-day-header {
    background: white;
    color: var(--text-secondary);
    padding: 1rem 0.5rem 0 0.5rem;
    padding-top: 3rem;
    margin-left: 12px;
    text-align: left;
    font-weight: 500;
    font-size: 0.85rem;
    border-top: none;
    text-transform: none;
    letter-spacing: 0;
}

.calendar-day {
    background: white;
    min-height: 100px;
    padding: 0.75rem 0.5rem;
    margin-left: 12px;
    border-top: 2px solid var(--border-light);
    position: relative;
    display: flex;
    flex-direction: column;
}

.calendar-day.empty {
    background: white;
}

.calendar-day.today {
    background: white;
    border-top: 4px solid var(--primary-blue);
}

.day-number {
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.calendar-day.today .day-number {
    font-weight: 400;
    color: var(--text-secondary);
}

.day-event {
    background: #e8f4f8;
    color: var(--text-primary);
    padding: 0.4rem 0.5rem;
    margin-bottom: 0.35rem;
    border-radius: 3px;
    border-left: 3px solid var(--primary-blue);
    font-size: 0.7rem;
    line-height: 1.3;
    cursor: pointer;
    white-space: normal;
    word-wrap: break-word;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.day-event:hover {
    background: #d0e8f2;
}

.day-event:last-child {
    margin-bottom: 0;
}

.event-name {
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.15rem;
    font-size: 0.75rem;
}

.event-details {
    font-weight: 400;
    color: var(--primary-blue);
    font-size: 0.65rem;
    line-height: 1.2;
}

/* Calendar Footer */
.calendar-footer {
    background: var(--dark-gray);
    color: white;
    padding: 1.5rem 0;
    margin-top: 3rem;
}
