/**
 * WG Consultation Booking - Frontend Styles
 */

.wgcb-booking-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.wgcb-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8em;
}

/* Pricing Info */
.wgcb-pricing-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.wgcb-price-option {
    text-align: center;
}

.wgcb-price-option .wgcb-duration {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.wgcb-price-option .wgcb-price {
    font-size: 1.4em;
    color: #2c3e50;
    font-weight: 700;
}

/* Cancellation Policy */
.wgcb-cancellation-policy {
    text-align: center;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 25px;
    padding: 10px;
    background: #fff3cd;
    border-radius: 5px;
    border-left: 4px solid #ffc107;
}

.wgcb-cancellation-policy p {
    margin: 0;
}

/* Calendar */
.wgcb-calendar-wrapper {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.wgcb-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.wgcb-nav-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background 0.2s;
}

.wgcb-nav-btn:hover {
    background: #e0e0e0;
}

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

.wgcb-current-month {
    font-size: 1.2em;
    font-weight: 600;
}

.wgcb-calendar-grid {
    width: 100%;
}

.wgcb-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.wgcb-weekdays span {
    padding: 5px;
    color: #666;
}

.wgcb-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.wgcb-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95em;
}

.wgcb-day:hover:not(.wgcb-day-disabled):not(.wgcb-day-empty) {
    background: #e3f2fd;
}

.wgcb-day-empty {
    cursor: default;
}

.wgcb-day-disabled {
    color: #ccc;
    cursor: not-allowed;
}

.wgcb-day-available {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
}

.wgcb-day-available:hover {
    background: #c8e6c9;
}

.wgcb-day-selected {
    background: #1976d2 !important;
    color: #fff !important;
}

.wgcb-day-today:not(.wgcb-day-disabled) {
    border: 2px solid #1976d2;
}

.wgcb-day-today.wgcb-day-disabled {
    border: none;
}

.wgcb-day-past {
    color: #ccc;
    cursor: not-allowed;
}

.wgcb-day-blocked {
    background: #ffebee;
    color: #c62828;
    cursor: not-allowed;
    position: relative;
}

.wgcb-day-blocked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 20%;
    right: 20%;
    height: 2px;
    background: #c62828;
    transform: rotate(-45deg);
}

/* Slots Section */
.wgcb-slots-wrapper {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.wgcb-selected-date {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.wgcb-duration-select {
    margin-bottom: 20px;
}

.wgcb-duration-select label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.wgcb-duration-buttons {
    display: flex;
    gap: 10px;
}

.wgcb-duration-btn {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s;
}

.wgcb-duration-btn:hover {
    border-color: #1976d2;
}

.wgcb-duration-btn.active {
    border-color: #1976d2;
    background: #e3f2fd;
    font-weight: 600;
}

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

/* Time Slots */
.wgcb-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.wgcb-time-slot {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.wgcb-time-slot:hover:not(.wgcb-slot-disabled) {
    border-color: #1976d2;
    background: #e3f2fd;
}

.wgcb-time-slot.wgcb-slot-selected {
    border-color: #1976d2;
    background: #1976d2;
    color: #fff;
}

.wgcb-time-slot.wgcb-slot-disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    text-decoration: line-through;
}

.wgcb-time-slot.wgcb-slot-booked {
    background: #ffebee;
    border-color: #ef9a9a;
    color: #c62828;
    cursor: not-allowed;
}

.wgcb-time-slot.wgcb-slot-booked:hover {
    background: #ffebee;
    border-color: #ef9a9a;
}

.wgcb-booked-label {
    display: block;
    font-size: 0.75em;
    text-transform: uppercase;
    margin-top: 4px;
    opacity: 0.8;
}

.wgcb-no-slots {
    text-align: center;
    color: #666;
    padding: 20px;
    grid-column: 1 / -1;
}

.wgcb-loading {
    text-align: center;
    padding: 20px;
    color: #666;
    grid-column: 1 / -1;
}

/* Booking Summary */
.wgcb-booking-summary {
    background: #f8f9fa;
    border: 2px solid #1976d2;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.wgcb-booking-summary h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1976d2;
}

.wgcb-summary-details p {
    margin: 8px 0;
}

.wgcb-summary-details strong {
    display: inline-block;
    min-width: 80px;
}

.wgcb-book-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    margin-top: 15px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.wgcb-book-btn:hover {
    background: #1565c0;
}

.wgcb-book-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Messages */
.wgcb-messages {
    margin-top: 15px;
}

.wgcb-message {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.wgcb-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wgcb-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.wgcb-message-info {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #99cfff;
}

/* My Account Booking Status */
.wgcb-status-confirmed {
    color: #2e7d32;
    font-weight: 600;
}

.wgcb-status-completed {
    color: #1976d2;
    font-weight: 600;
}

.wgcb-status-cancelled {
    color: #c62828;
    font-weight: 600;
}

.wgcb-status-pending {
    color: #f57c00;
    font-weight: 600;
}

/* My Account Actions Dropdown */
.wgcb-dropdown {
    position: relative;
    display: inline-block;
}

.wgcb-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    color: #333;
    transition: all 0.2s;
}

.wgcb-dropdown-toggle:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.wgcb-dropdown.open .wgcb-dropdown-toggle {
    background: #e9ecef;
    border-color: #adb5bd;
}

.wgcb-dropdown-arrow {
    font-size: 0.7em;
    transition: transform 0.2s;
}

.wgcb-dropdown.open .wgcb-dropdown-arrow {
    transform: rotate(180deg);
}

.wgcb-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    min-width: 160px;
    margin-top: 4px;
    padding: 6px 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.wgcb-dropdown.open .wgcb-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wgcb-dropdown-item {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 0.9em;
    transition: background 0.15s;
}

.wgcb-dropdown-item:hover {
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
}

.wgcb-dropdown-pay {
    color: #28a745;
    font-weight: 500;
}

.wgcb-dropdown-pay:hover {
    background: #d4edda;
    color: #1e7e34;
}

.wgcb-dropdown-cancel {
    color: #dc3545 !important;
    background: transparent !important;
    border: none !important;
}

.wgcb-dropdown-cancel:hover {
    background: #f8d7da !important;
    color: #c82333 !important;
}

/* Cancel Confirmation Modal */
.wgcb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.wgcb-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.wgcb-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 420px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.wgcb-modal-overlay.active .wgcb-modal {
    transform: scale(1);
}

.wgcb-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wgcb-modal-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff3cd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.wgcb-modal-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.wgcb-modal-body {
    padding: 24px;
}

.wgcb-modal-message {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.wgcb-modal-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.wgcb-modal-details p {
    margin: 6px 0;
    font-size: 0.95em;
}

.wgcb-modal-details strong {
    color: #333;
}

.wgcb-modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.wgcb-modal-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.wgcb-modal-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.wgcb-modal-btn-secondary:hover {
    background: #e0e0e0;
}

.wgcb-modal-btn-danger {
    background: #dc3545;
    color: #fff;
}

.wgcb-modal-btn-danger:hover {
    background: #c82333;
}

/* ================================
   Notes & Attachments Section
   ================================ */

/* Booking Detail Page */
.wgcb-booking-detail {
    max-width: 800px;
    margin: 0 auto;
}

.wgcb-booking-detail h2 {
    margin-bottom: 20px;
    font-size: 1.5em;
}

.wgcb-detail-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.wgcb-detail-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.wgcb-detail-row {
    display: flex;
    margin-bottom: 10px;
}

.wgcb-detail-row:last-child {
    margin-bottom: 0;
}

.wgcb-detail-label {
    font-weight: 600;
    min-width: 120px;
    color: #666;
}

.wgcb-detail-value {
    flex: 1;
}

/* Notes Sections */
.wgcb-notes-section {
    margin-bottom: 30px;
}

.wgcb-notes-section:last-child {
    margin-bottom: 0;
}

.wgcb-notes-section h4 {
    margin: 0 0 15px 0;
    font-size: 1em;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wgcb-notes-section h4 .dashicons {
    color: #666;
}

.wgcb-notes-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s;
}

.wgcb-notes-textarea:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

.wgcb-notes-textarea:disabled,
.wgcb-notes-textarea[readonly] {
    background: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}

.wgcb-notes-readonly {
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-height: 60px;
    white-space: pre-wrap;
    line-height: 1.5;
    color: #333;
}

.wgcb-notes-readonly.empty {
    color: #999;
    font-style: italic;
}

.wgcb-notes-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.wgcb-save-notes-btn {
    padding: 10px 20px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.wgcb-save-notes-btn:hover {
    background: #1565c0;
}

.wgcb-save-notes-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.wgcb-notes-status {
    font-size: 13px;
    color: #666;
}

.wgcb-notes-status.success {
    color: #2e7d32;
}

.wgcb-notes-status.error {
    color: #c62828;
}

/* Attachments */
.wgcb-attachments {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.wgcb-attachments h5 {
    margin: 0 0 12px 0;
    font-size: 0.9em;
    color: #666;
    font-weight: 600;
}

.wgcb-attachments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.wgcb-attachment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: background 0.15s;
}

.wgcb-attachment-item:hover {
    background: #f1f3f4;
}

.wgcb-attachment-icon {
    font-size: 20px;
    color: #666;
}

.wgcb-attachment-info {
    flex: 1;
    min-width: 0;
}

.wgcb-attachment-name {
    display: block;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wgcb-attachment-name:hover {
    color: #1976d2;
    text-decoration: underline;
}

.wgcb-attachment-meta {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.wgcb-attachment-delete {
    padding: 6px 10px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
}

.wgcb-attachment-delete:hover {
    background: #ffebee;
    border-color: #ef9a9a;
    color: #c62828;
}

.wgcb-no-attachments {
    color: #888;
    font-style: italic;
    font-size: 13px;
    padding: 10px 0;
}

/* Upload Button */
.wgcb-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 6px;
    color: #666;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.wgcb-upload-btn:hover {
    background: #e9ecef;
    border-color: #999;
    color: #333;
}

.wgcb-upload-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Upload Modal */
.wgcb-upload-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.wgcb-upload-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.wgcb-upload-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 480px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.wgcb-upload-modal-overlay.active .wgcb-upload-modal {
    transform: scale(1);
}

.wgcb-upload-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wgcb-upload-modal-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

.wgcb-upload-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.wgcb-upload-modal-close:hover {
    color: #333;
}

.wgcb-upload-modal-body {
    padding: 24px;
}

.wgcb-upload-drop-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #fafafa;
    transition: all 0.2s;
    cursor: pointer;
}

.wgcb-upload-drop-zone:hover,
.wgcb-upload-drop-zone.dragover {
    border-color: #1976d2;
    background: #e3f2fd;
}

.wgcb-upload-drop-zone .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #999;
    margin-bottom: 15px;
}

.wgcb-upload-drop-zone.dragover .dashicons {
    color: #1976d2;
}

.wgcb-upload-drop-zone p {
    margin: 0 0 10px 0;
    color: #666;
}

.wgcb-upload-drop-zone .wgcb-upload-hint {
    font-size: 12px;
    color: #999;
}

.wgcb-upload-progress {
    display: none;
    margin-top: 20px;
}

.wgcb-upload-progress.active {
    display: block;
}

.wgcb-upload-progress-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.wgcb-upload-progress-fill {
    height: 100%;
    background: #1976d2;
    width: 0;
    transition: width 0.3s;
}

.wgcb-upload-progress-text {
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: #666;
}

/* Back Link */
.wgcb-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1976d2;
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 14px;
}

.wgcb-back-link:hover {
    text-decoration: underline;
}

.wgcb-back-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Responsive */
@media (max-width: 480px) {
    .wgcb-pricing-info {
        flex-direction: column;
        gap: 15px;
    }

    .wgcb-duration-buttons {
        flex-direction: column;
    }

    .wgcb-time-slots {
        grid-template-columns: repeat(3, 1fr);
    }

    .wgcb-day {
        font-size: 0.85em;
    }

    .wgcb-detail-row {
        flex-direction: column;
        gap: 4px;
    }

    .wgcb-detail-label {
        min-width: auto;
    }

    .wgcb-attachment-item {
        flex-wrap: wrap;
    }

    .wgcb-attachment-info {
        width: calc(100% - 40px);
    }

    .wgcb-attachment-delete {
        margin-left: auto;
    }
}
