/**
 * Grooming Services Selection Styles
 *
 * @package QuickCal
 * @since 2.3.0
 */

/* ===== Container ===== */
.quickcal-grooming-fields {
    padding: 0;
}

.quickcal-grooming-section {
    margin-bottom: 20px;
}

.quickcal-grooming-section:last-child {
    margin-bottom: 0;
}

.quickcal-grooming-section .quickcal-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.quickcal-grooming-section .quickcal-section-label i {
    color: #d35400;
}

.quickcal-grooming-section .quickcal-required {
    color: #e74c3c;
    font-size: 13px;
}

.quickcal-grooming-section .quickcal-optional {
    font-weight: 400;
    color: #888;
    font-size: 12px;
}

/* ===== Phone Field ===== */
.quickcal-phone-section {
    margin-bottom: 24px;
}

.quickcal-phone-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.quickcal-phone-input:focus {
    outline: none;
    border-color: #d35400;
    box-shadow: 0 0 0 3px rgba(211, 84, 0, 0.1);
}

.quickcal-phone-hint {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}

/* ===== Service Cards ===== */
.quickcal-service-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.quickcal-service-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.quickcal-service-card:hover {
    border-color: #ccc;
    background: #f5f5f5;
}

.quickcal-service-card:focus {
    outline: none;
    border-color: #d35400;
    box-shadow: 0 0 0 3px rgba(211, 84, 0, 0.1);
}

.quickcal-service-card.selected {
    border-color: #d35400;
    background: linear-gradient(135deg, #fef9e7 0%, #fdebd0 100%);
    box-shadow: 0 2px 8px rgba(211, 84, 0, 0.12);
}

.quickcal-service-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
}

.quickcal-service-card-icon i {
    font-size: 18px;
    color: #666;
}

.quickcal-service-card.selected .quickcal-service-card-icon {
    background: #d35400;
    border-color: #d35400;
}

.quickcal-service-card.selected .quickcal-service-card-icon i {
    color: #fff;
}

.quickcal-service-card-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.quickcal-service-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quickcal-service-card.selected .quickcal-service-title {
    color: #b34700;
}

.quickcal-service-short {
    display: block;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Info button - reset all modal button styles */
.quickcal-service-info-btn,
.quickcal-service-info-btn:hover,
.quickcal-service-info-btn:focus,
.quickcal-service-info-btn:active,
.booked-modal .quickcal-service-info-btn,
.booked-form .quickcal-service-info-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer;
    color: #999 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: none !important;
    text-transform: none !important;
    font-size: inherit !important;
    line-height: 1 !important;
}

.quickcal-service-info-btn:hover,
.booked-modal .quickcal-service-info-btn:hover {
    color: #d35400 !important;
    background: rgba(211, 84, 0, 0.1) !important;
}

.quickcal-service-info-btn i {
    font-size: 16px !important;
    color: inherit !important;
}

/* Tooltip for full description */
.quickcal-service-full-desc {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    background: #333;
    color: #fff;
    font-size: 12px;
    line-height: 1.5;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.quickcal-service-full-desc::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: #333;
    transform: rotate(45deg);
}

/* Puppy services badge */
.quickcal-puppy-service::before {
    content: 'PUPPY';
    position: absolute;
    top: -1px;
    right: 46px;
    background: #9b59b6;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 0 0 5px 5px;
    letter-spacing: 0.5px;
}

/* ===== Add-On Cards ===== */
.quickcal-addon-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.quickcal-addon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quickcal-addon-card:hover {
    border-color: #ccc;
    background: #f5f5f5;
}

.quickcal-addon-card:focus {
    outline: none;
    border-color: #d35400;
    box-shadow: 0 0 0 3px rgba(211, 84, 0, 0.1);
}

.quickcal-addon-card.selected {
    border-color: #d35400;
    background: rgba(211, 84, 0, 0.06);
}

.quickcal-addon-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
}

.quickcal-addon-card-icon i {
    font-size: 16px;
    color: #666;
}

.quickcal-addon-card.selected .quickcal-addon-card-icon {
    background: #d35400;
    border-color: #d35400;
}

.quickcal-addon-card.selected .quickcal-addon-card-icon i {
    color: #fff;
}

.quickcal-addon-card-content {
    width: 100%;
}

.quickcal-addon-title {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.quickcal-addon-card.selected .quickcal-addon-title {
    color: #b34700;
}

.quickcal-addon-desc {
    display: block;
    font-size: 10px;
    color: #666;
    line-height: 1.3;
    margin-bottom: 4px;
}

.quickcal-addon-price {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
}

/* "No Extras" default styling */
.quickcal-addon-default .quickcal-addon-card-icon {
    background: #f0f0f0;
}

.quickcal-addon-default .quickcal-addon-card-icon i {
    color: #999;
}

.quickcal-addon-default.selected {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.06);
}

.quickcal-addon-default.selected .quickcal-addon-card-icon {
    background: #27ae60;
    border-color: #27ae60;
}

.quickcal-addon-default.selected .quickcal-addon-card-icon i {
    color: #fff;
}

.quickcal-addon-default.selected .quickcal-addon-title {
    color: #1e8449;
}

/* ===== Appointment Service Info Display ===== */
.quickcal-appt-service-info {
    padding: 0;
}

.quickcal-appt-service-info .cf-meta-value {
    margin: 0 0 10px 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.4;
}

.quickcal-appt-service-info .cf-meta-value:last-child {
    margin-bottom: 0;
}

.quickcal-appt-service-info .cf-meta-value strong {
    color: #333;
    font-weight: 600;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .quickcal-addon-cards {
        grid-template-columns: 1fr;
    }

    .quickcal-service-card {
        padding: 10px 12px;
    }

    .quickcal-service-card-icon {
        width: 36px;
        height: 36px;
    }

    .quickcal-service-card-icon i {
        font-size: 16px;
    }

    .quickcal-service-title {
        font-size: 12px;
    }

    .quickcal-service-short {
        font-size: 10px;
    }

    .quickcal-puppy-service::before {
        right: 40px;
        font-size: 7px;
        padding: 2px 5px;
    }

    .quickcal-addon-card {
        flex-direction: row;
        text-align: left;
        padding: 10px 12px;
        gap: 10px;
    }

    .quickcal-addon-card-icon {
        margin-bottom: 0;
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    .quickcal-addon-card-icon i {
        font-size: 14px;
    }

    .quickcal-addon-card-content {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 8px;
    }

    .quickcal-addon-title {
        margin-bottom: 0;
    }

    .quickcal-addon-desc {
        display: none;
    }

    .quickcal-addon-price {
        margin-top: 0;
    }
}

/* ===== Admin Context Adjustments ===== */
.booked-form .quickcal-grooming-fields,
.quickcal-new-appt-modal .quickcal-grooming-fields {
    padding: 0;
}

.quickcal-new-appt-modal .quickcal-grooming-section {
    margin-bottom: 16px;
}

.quickcal-new-appt-modal .quickcal-service-card {
    padding: 10px 12px;
}

.quickcal-new-appt-modal .quickcal-addon-cards {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 600px) {
    .quickcal-new-appt-modal .quickcal-addon-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Waiting List Context ===== */
.booked-wl-form .quickcal-grooming-fields {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.booked-wl-form .quickcal-grooming-section {
    margin-bottom: 20px;
}

.booked-wl-form .quickcal-section-label {
    font-size: 15px;
}
