/* DJ Manager Public Styles */

.djm-calendar-wrap {
    background: var(--djm-bg, #fff);
    color: var(--djm-text, #333);
    border: 1px solid var(--djm-border, #ddd);
    border-radius: var(--djm-radius, 8px);
    padding: 16px;
    max-width: 420px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.djm-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--djm-header-bg, #2196F3);
    color: var(--djm-header-text, #fff);
    padding: 10px 14px;
    border-radius: calc(var(--djm-radius, 8px) - 2px);
    margin-bottom: 12px;
}

.djm-cal-header button {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
}

.djm-cal-header button:hover {
    background: rgba(255,255,255,0.2);
}

.djm-cal-title {
    font-weight: 600;
    font-size: 16px;
}

.djm-cal-weekdays {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    margin-bottom: 6px;
}

.djm-cal-weekdays span {
    display: block;
    padding: 4px 0;
}

.djm-cal-days {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 4px;
}

.djm-cal-day {
    aspect-ratio: 1;
    min-height: 36px;
    min-width: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
    cursor: default;
    transition: background 0.15s, color 0.15s;
    position: relative;
    box-sizing: border-box;
}

.djm-cal-day.other-month {
    opacity: 0.35;
}

.djm-cal-day.available {
    background: var(--djm-available, #4CAF50);
    color: #fff;
    cursor: pointer;
}

.djm-cal-day.unavailable {
    background: var(--djm-unavailable, #f44336);
    color: #fff;
    cursor: pointer;
}

.djm-cal-day.partial {
    background: var(--djm-partial, #FF9800);
    color: #fff;
    cursor: pointer;
}

.djm-cal-day.available:hover,
.djm-cal-day.unavailable:hover {
    filter: brightness(1.1);
}

.djm-cal-day.selected {
    outline: 3px solid #333;
    outline-offset: 1px;
}

.djm-cal-day.today {
    font-weight: 700;
    box-shadow: inset 0 0 0 2px currentColor;
}

.djm-cal-legend {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    font-size: 13px;
}

.djm-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.djm-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.djm-dot.available { background: var(--djm-available, #4CAF50); }
.djm-dot.unavailable { background: var(--djm-unavailable, #f44336); }
.djm-dot.partial { background: var(--djm-partial, #FF9800); }

/* Enquiry form */
.djm-enquiry-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 900px;
}

@media (max-width: 700px) {
    .djm-enquiry-wrapper {
        grid-template-columns: 1fr;
    }
}

.djm-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

.djm-form input[type="text"],
.djm-form input[type="email"],
.djm-form input[type="tel"],
.djm-form input[type="date"],
.djm-form input[type="number"],
.djm-form input[type="time"],
.djm-form select,
.djm-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.djm-btn {
    background: #2196F3;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 600;
}

.djm-btn:hover {
    background: #1976D2;
}

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

#djm-enquiry-result {
    margin-top: 12px;
    padding: 10px;
    border-radius: 6px;
}

#djm-enquiry-result.success {
    background: #e8f5e9;
    color: #2e7d32;
}

#djm-enquiry-result.error {
    background: #ffebee;
    color: #c62828;
}

/* Client Portal */
.djm-client-portal {
    max-width: 960px;
    margin: 0 auto;
}

.djm-portal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

.djm-portal-nav a {
    padding: 8px 16px;
    text-decoration: none;
    color: #555;
    border-radius: 6px 6px 0 0;
    font-weight: 500;
}

.djm-portal-nav a:hover {
    background: #f5f5f5;
}

.djm-portal-nav a.active {
    background: #2196F3;
    color: #fff;
}

.djm-dashboard-cards {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.djm-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 24px;
    flex: 1;
    text-align: center;
}

.djm-stat {
    font-size: 32px;
    font-weight: 700;
    margin: 8px 0 0;
    color: #2196F3;
}

.djm-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.djm-table th,
.djm-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.djm-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.djm-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.djm-status-pending { background: #fff3e0; color: #e65100; }
.djm-status-confirmed { background: #e8f5e9; color: #2e7d32; }
.djm-status-completed { background: #e3f2fd; color: #1565c0; }
.djm-status-cancelled { background: #fce4ec; color: #c62828; }
.djm-status-unpaid { background: #ffebee; color: #c62828; }
.djm-status-partial { background: #fff8e1; color: #f57f17; }
.djm-status-paid { background: #e8f5e9; color: #2e7d32; }
.djm-status-draft { background: #f5f5f5; color: #616161; }
.djm-status-sent { background: #e3f2fd; color: #1565c0; }
.djm-status-accepted { background: #e8f5e9; color: #2e7d32; }
.djm-status-converted { background: #e8f5e9; color: #2e7d32; }

.djm-list {
    list-style: none;
    padding: 0;
}

.djm-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.djm-login-form {
    max-width: 360px;
    margin: 40px auto;
    padding: 24px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.djm-login-note {
    font-size: 13px;
    color: #777;
    margin-top: 16px;
}

/* Messages */
.djm-threads-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 16px;
}

.djm-thread-item {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.djm-thread-item:hover {
    background: #f5f5f5;
}

.djm-thread-item.active {
    background: #e3f2fd;
}

.djm-thread-item .unread {
    background: #f44336;
    color: #fff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

#djm-message-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    background: #fafafa;
}

.djm-msg {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 80%;
}

.djm-msg.mine {
    background: #e3f2fd;
    margin-left: auto;
}

.djm-msg.theirs {
    background: #fff;
    border: 1px solid #eee;
}

.djm-msg .meta {
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
}

.djm-upload-form {
    background: #f9f9f9;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.djm-note {
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Layout blocks from form builder */
.djm-enquiry-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    max-width: 1000px;
}
.djm-block-half {
    flex: 1 1 320px;
    min-width: 280px;
}
.djm-block-full {
    flex: 1 1 100%;
    width: 100%;
}
.djm-calendar-fullwidth .djm-calendar-wrap,
.djm-shortcode-calendar.djm-calendar-fullwidth .djm-calendar-wrap {
    max-width: 100% !important;
    width: 100%;
}
.djm-field-checkbox {
    margin-bottom: 12px;
}
.djm-field-heading {
    margin: 8px 0;
}
.djm-field-paragraph {
    margin: 0 0 12px;
    color: #666;
}
