/**
 * TME Public Styles
 * 
 * Clean, responsive styles for frontend components
 */

/* License Verification Display in Dashboard Views */
.tme-license-verification-status {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 12px;
    margin: 10px 0;
}

.tme-license-verification-status strong {
    color: #155724;
    font-weight: 600;
}

.tme-verification-confirmed {
    color: #155724;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.tme-verification-timestamp {
    margin-top: 5px;
    opacity: 0.8;
}

.tme-verification-timestamp small {
    color: #495057;
    font-style: italic;
}

/* License verification in student dashboards */
.tme-license-verification .tme-info-card.verification-card {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #28a745;
}

.tme-license-verification .verification-card i {
    color: #28a745;
    font-size: 18px;
}

.tme-license-verification .verification-card strong {
    color: #155724;
}

.tme-license-verification .verification-card p {
    color: #495057;
    margin: 5px 0 0 0;
}

.verification-timestamp {
    color: #6c757d !important;
    font-style: italic;
    font-size: 12px;
    margin-top: 5px;
}

/* Group Booking Components */
.tme-group-booking-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.tme-group-booking-section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.tme-section-header {
    text-align: center;
    margin-bottom: 25px;
}

.tme-section-header h4 {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px 0;
    position: relative;
}

.tme-section-header h4:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #007cba, #0073aa);
    margin: 10px auto 0;
    border-radius: 2px;
}

.tme-section-header .description {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
    font-style: italic;
}

/* Field Groups */
.tme-field-group {
    margin-bottom: 25px;
    position: relative;
}

.tme-field-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tme-field-group select,
.tme-field-group input[type="text"],
.tme-field-group input[type="email"],
.tme-field-group input[type="tel"] {
    width: 100%;
    max-width: 350px;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tme-field-group select:focus,
.tme-field-group input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    transform: translateY(-1px);
}

.tme-field-group select:hover,
.tme-field-group input:hover {
    border-color: #ced4da;
}

/* Participant Details */
#tme-participants-details {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

#tme-participants-details h5 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
}

#tme-participants-details h5:before {
    content: '👥';
    margin-right: 10px;
    font-size: 20px;
}

/* Participant Rows */
.tme-participant-row {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.tme-participant-row:hover {
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.tme-participant-row h6 {
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 18px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
    position: relative;
}

.tme-participant-row h6:before {
    content: counter(participant-counter);
    counter-increment: participant-counter;
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 10px;
    position: absolute;
    left: -5px;
    top: -2px;
}

#tme-participants-container {
    counter-reset: participant-counter 1;
}

/* Participant Fields */
.tme-participant-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.tme-participant-optional {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tme-field-half {
    position: relative;
}

.tme-field-half label {
    font-size: 13px;
    margin-bottom: 6px;
    color: #6c757d;
    text-transform: none;
    letter-spacing: normal;
}

.tme-field-half input {
    width: 100%;
    max-width: none;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 13px;
}

/* Required field indicator */
.required {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 2px;
}

/* Field validation */
.tme-field-error {
    border-color: #e74c3c !important;
    background-color: #fff5f5;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Pricing Display */
.tme-pricing-info {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.tme-pricing-breakdown {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.tme-pricing-breakdown:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007cba, #0073aa);
}

.tme-pricing-breakdown h6 {
    margin: 0 0 18px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.tme-pricing-breakdown h6:before {
    content: '💰';
    margin-right: 10px;
    font-size: 18px;
}

.pricing-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 0;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.pricing-line:hover {
    background-color: rgba(0, 115, 170, 0.05);
}

.pricing-line.total {
    border-top: 2px solid #e9ecef;
    margin-top: 15px;
    padding-top: 15px;
    font-size: 18px;
    font-weight: bold;
    background: rgba(0, 115, 170, 0.1);
    padding: 15px 10px;
    border-radius: 8px;
}

.pricing-line.discount {
    color: #27ae60;
    font-weight: 600;
    background: rgba(39, 174, 96, 0.1);
    padding: 8px 10px;
    border-radius: 6px;
}

.pricing-line.per-person {
    color: #7f8c8d;
    font-size: 14px;
    font-style: italic;
    background: rgba(127, 140, 141, 0.05);
    padding: 6px 10px;
    border-radius: 4px;
}

/* Meeting Provider Selection */
.tme-field-group select[name="tme_meeting_provider"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

/* Loading States */
.tme-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.tme-loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top: 2px solid #0073aa;
    animation: spin 1s linear infinite;
}

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

/* Success States */
.tme-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 15px 0;
    display: flex;
    align-items: center;
}

.tme-success:before {
    content: '✅';
    margin-right: 10px;
    font-size: 16px;
}

/* Error States */
.tme-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 15px 0;
    display: flex;
    align-items: center;
}

.tme-error:before {
    content: '❌';
    margin-right: 10px;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tme-group-booking-section {
        padding: 20px 15px;
        margin: 15px 0;
        border-radius: 8px;
    }
    
    .tme-participant-fields,
    .tme-participant-optional {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tme-field-group select,
    .tme-field-group input {
        max-width: none;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .pricing-line {
        font-size: 14px;
    }
    
    .pricing-line.total {
        font-size: 16px;
    }
    
    #tme-participants-details {
        padding: 20px 15px;
    }
    
    .tme-participant-row {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .tme-section-header h4 {
        font-size: 18px;
    }
    
    .tme-participant-row h6:before {
        position: static;
        margin-right: 8px;
    }
    
    .pricing-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .pricing-line span:last-child {
        font-weight: bold;
        color: #0073aa;
    }
}

/* Print Styles */
@media print {
    .tme-group-booking-section {
        background: none;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .tme-participant-row {
        background: none;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .tme-loading:after {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .tme-group-booking-section {
        border-width: 2px;
    }
    
    .tme-field-group select,
    .tme-field-group input {
        border-width: 2px;
    }
    
    .tme-field-group select:focus,
    .tme-field-group input:focus {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}