/* TRM Counseling Session Scheduler Styles */

.trm-booking-wrapper {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.trm-booking-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 40px;
}

.trm-booking-container h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 28px;
}

.trm-description {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-style: italic;
}

.trm-step {
    display: none;
}

.trm-step.active {
    display: block;
}

.trm-step h3 {
    color: #34495e;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.trm-form-group {
    margin-bottom: 20px;
}

.trm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.trm-form-group input[type="text"],
.trm-form-group input[type="email"],
.trm-form-group input[type="tel"],
.trm-form-group input[type="date"],
.trm-form-group input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.trm-form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.time-slot-btn {
    padding: 12px 20px;
    background: #ecf0f1;
    border: 2px solid #bdc3c7;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.time-slot-btn:hover {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.time-slot-btn.selected {
    background: #2980b9;
    color: #fff;
    border-color: #2980b9;
}
.trm-field-error {
    color: #b00020; /* standard red */
    margin-top: 4px;
}
.trm-form-messages {
    margin-bottom: 12px;
}
.trm-form-message {
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 4px;
}
.trm-form-message.trm-error {
    background: #fdecea;
    color: #611a15;
    border: 1px solid #f5c6cb;
}
.trm-form-message.trm-success {
    background: #e6ffed;
    color: #164e3b;
    border: 1px solid #9ee6b8;
}

/* Booked/disabled time slots appear grayed out and are not clickable */
.time-slot-btn.time-slot-booked,
.time-slot-btn[disabled] {
    background: #f0f0f0;
    color: #999;
    border-color: #ddd;
    cursor: not-allowed;
}

.time-slot-btn.time-slot-booked:hover,
.time-slot-btn[disabled]:hover {
    background: #f0f0f0;
    color: #999;
    border-color: #ddd;
}

/* Blocked time slots appear grayed out, distinct from booked */
.time-slot-btn.time-slot-blocked {
    background: #f5e6e6;
    color: #a08080;
    border-color: #e8d0d0;
    cursor: not-allowed;
}

.time-slot-btn.time-slot-blocked:hover {
    background: #f5e6e6;
    color: #a08080;
    border-color: #e8d0d0;
}

.trm-slot-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 8px 0 10px;
    font-size: 13px;
    color: #7f8c8d;
    align-items: center;
}

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

.trm-slot-legend-box {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid #bdc3c7;
    display: inline-block;
}

.trm-slot-legend-box.trm-slot-legend-available {
    background: #ecf0f1;
}

.trm-slot-legend-box.trm-slot-legend-booked {
    background: #f0f0f0;
}

.trm-slot-legend-box.trm-slot-legend-selected {
    background: #2980b9;
    border-color: #2980b9;
}

.trm-note {
    color: #7f8c8d;
    font-style: italic;
    padding: 15px;
    background: #ecf0f1;
    border-radius: 4px;
}

.trm-error {
    color: #e74c3c;
    padding: 15px;
    background: #fadbd8;
    border-radius: 4px;
}

.trm-membership-question {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.trm-membership-question p {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

.trm-radio-group {
    display: flex;
    gap: 20px;
}

.trm-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    cursor: pointer;
}

.trm-radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.trm-donation-message {
    background: #e8f4f8;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 25px;
    border-left: 4px solid #3498db;
}

.trm-donation-message p {
    margin: 0;
    color: #2c3e50;
    line-height: 1.6;
}

.trm-donation-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.trm-donation-btn,
.trm-donation-btn-nm {
    padding: 12px 15px;
    background: #fff;
    border: 2px solid #3498db;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #3498db;
    transition: all 0.3s;
    white-space: normal;
    word-wrap: break-word;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.trm-donation-btn:hover,
.trm-donation-btn-nm:hover {
    background: #3498db;
    color: #fff;
}

.trm-donation-btn.selected,
.trm-donation-btn-nm.selected {
    background: #2980b9;
    color: #fff;
    border-color: #2980b9;
}

.trm-custom-amount-wrapper,
.trm-custom-amount-wrapper-nm {
    margin-top: 15px;
}

.trm-custom-amount-wrapper input,
.trm-custom-amount-wrapper-nm input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.trm-warning-message {
    background: #fff3cd;
    padding: 25px;
    border-radius: 4px;
    border-left: 4px solid #ffc107;
    margin-bottom: 25px;
}

.trm-warning-message p {
    margin: 10px 0;
    color: #856404;
    line-height: 1.6;
}

.trm-booking-summary {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 4px;
    margin-bottom: 25px;
}

.summary-item {
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
    font-size: 16px;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item strong {
    display: inline-block;
    width: 150px;
    color: #2c3e50;
}

.trm-success-message {
    text-align: center;
    padding: 40px 20px;
}

.trm-success-message h3 {
    color: #27ae60;
    font-size: 32px;
    margin-bottom: 15px;
}

.trm-confidentiality {
    margin-top: 30px;
    padding: 20px;
    background: #e8f4f8;
    border-radius: 4px;
    font-size: 14px;
    color: #2c3e50;
    font-style: italic;
}

.trm-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.trm-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.trm-btn-primary {
    background: #3498db;
    color: #fff;
}

.trm-btn-primary:hover:not(:disabled) {
    background: #2980b9;
}

.trm-btn-secondary {
    background: #95a5a6;
    color: #fff;
}

.trm-btn-secondary:hover:not(:disabled) {
    background: #7f8c8d;
}

.trm-btn-back {
    background: #ecf0f1;
    color: #2c3e50;
}

.trm-btn-back:hover {
    background: #bdc3c7;
}

.trm-btn-next {
    background: #3498db;
    color: #fff;
}

.trm-btn-next:hover:not(:disabled) {
    background: #2980b9;
}

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

#payment-methods-group {
    display: none;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

#payment-methods-group.visible {
    display: flex !important;
}

#payment-methods-group button {
    flex: 1;
    min-width: 120px;
}

.trm-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.trm-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.trm-minimum-notice {
    color: #e74c3c;
    font-weight: 600;
    margin-top: 10px;
    padding: 10px;
    background: #fadbd8;
    border-radius: 4px;
}

.trm-checkout-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.trm-checkout-section h4 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
    font-size: 18px;
}

.trm-checkout-details {
    padding: 10px 0;
}

.trm-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.trm-detail-row:last-child {
    border-bottom: none;
}

.trm-detail-label {
    font-weight: 600;
    color: #495057;
}

.trm-detail-value {
    color: #212529;
    text-align: right;
}

.trm-payment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.trm-payment-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.trm-payment-option:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.trm-payment-option input[type="radio"] {
    display: none;
}

.trm-payment-option:has(input:checked) {
    border-color: #3498db;
    background: #e8f4f8;
}

.trm-payment-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.trm-payment-label {
    font-weight: 600;
    color: #2c3e50;
}

@media (max-width: 768px) {
    .trm-booking-container {
        padding: 12px;
        border-radius: 6px;
    }
    
    .trm-booking-wrapper {
        padding: 8px;
        margin: 10px auto;
    }

    .trm-booking-container h2 {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .trm-description {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .trm-step h3 {
        font-size: 16px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .trm-form-group {
        margin-bottom: 12px;
    }

    .trm-form-group label {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .trm-form-group input[type="text"],
    .trm-form-group input[type="email"],
    .trm-form-group input[type="tel"],
    .trm-form-group input[type="date"],
    .trm-form-group input[type="number"] {
        padding: 8px;
        font-size: 14px;
    }
    
    .time-slots-grid,
    .trm-donation-options {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 6px;
    }

    .time-slot-btn,
    .trm-donation-btn {
        padding: 6px 8px;
        font-size: 11px;
        border-radius: 3px;
        border-width: 1px;
        line-height: 1.2;
    }
    
    .trm-form-actions {
        flex-direction: column;
        gap: 8px;
        margin-top: 12px;
    }
    
    #payment-methods-group {
        flex-direction: column !important;
        gap: 8px !important;
        margin-top: 8px;
    }
    
    .trm-btn {
        width: 100%;
        padding: 10px 12px;
        font-size: 13px;
    }

    .trm-booking-summary {
        margin: 12px 0;
    }

    .summary-item {
        padding: 6px 0;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .trm-booking-container {
        padding: 10px;
    }
    
    .trm-booking-wrapper {
        padding: 4px;
        margin: 5px auto;
    }

    .trm-booking-container h2 {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .trm-description {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .trm-step h3 {
        font-size: 15px;
        margin-bottom: 10px;
        padding-bottom: 6px;
    }

    .trm-form-group {
        margin-bottom: 10px;
    }

    .trm-form-group label {
        font-size: 12px;
        margin-bottom: 3px;
    }

    .trm-form-group input[type="text"],
    .trm-form-group input[type="email"],
    .trm-form-group input[type="tel"],
    .trm-form-group input[type="date"],
    .trm-form-group input[type="number"] {
        padding: 8px;
        font-size: 14px;
    }
    
    .time-slots-grid,
    .trm-donation-options {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 3px;
    }

    .time-slot-btn,
    .trm-donation-btn {
        padding: 15px 6px;
        font-size: 10px;
        border-radius: 2px;
        border-width: 1px;
        line-height: 1.1;
        min-height: auto;
    }
    
    .trm-form-actions {
        gap: 6px;
        margin-top: 10px;
    }
    
    #payment-methods-group {
        gap: 6px !important;
        margin-top: 6px;
    }
    
    .trm-btn {
        padding: 8px 10px;
        font-size: 12px;
    }

    .trm-booking-summary {
        margin: 8px 0;
    }

    .summary-item {
        padding: 4px 0;
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .trm-booking-container {
        padding: 8px;
    }
    
    .trm-step h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .time-slots-grid,
    .trm-donation-options {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 2px;
    }

    .time-slot-btn,
    .trm-donation-btn {
        padding: 3px 4px;
        font-size: 9px;
        border-radius: 2px;
        line-height: 1;
        min-height: 40px;
    }

    .trm-btn {
        padding: 8px 10px;
        font-size: 11px;
    }

    .summary-item {
        padding: 2px 0;
        font-size: 11px;
    }
}
