/* ==========================================
   TUTOR CLASS CARD STYLES
   ========================================== */

.tutor-class-card {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.tutor-class-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 21, 56, 0.1);
    border-color: rgba(139, 21, 56, 0.3);
}

.pending-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    animation: pendingPulse 2s infinite ease-in-out;
}

@keyframes pendingPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.5);
    }
}

.class-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.class-title {
    margin: 0;
    color: #8b1538;
    font-size: 1.25rem;
    font-weight: 600;
    flex: 1;
}

.class-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.class-date {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.class-time {
    color: #666;
    font-size: 0.875rem;
}

.class-details {
    margin-bottom: 1rem;
}

.class-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.info-item.location-item {
    grid-column: 1 / -1;
}

.info-item .label {
    color: #666;
    font-size: 0.875rem;
    white-space: nowrap;
}

.info-item .value {
    font-weight: 600;
    color: #333;
    text-align: right;
    flex-shrink: 0;
}

.class-description {
    padding: 0.75rem;
    background: rgba(139, 21, 56, 0.05);
    border-radius: 8px;
    border-left: 3px solid #8b1538;
}

.class-description p {
    margin: 0;
    color: #555;
    font-size: 0.875rem;
    line-height: 1.4;
}

.class-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid rgba(139, 21, 56, 0.1);
}

/* Edit Location button styling */
.btn-edit-location {
    background: #8b1538;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s ease;
    margin-right: 0.5rem;
}

.btn-edit-location:hover {
    background: #6d1028;
    transform: translateY(-1px);
}

/* Modal styles */
.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: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
}

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

.modal-header h3 {
    margin: 0;
    color: #8b1538;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: #f0f0f0;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body .form-group {
    margin-bottom: 1rem;
}

.modal-body label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}

.modal-body .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.modal-body .form-control:focus {
    outline: none;
    border-color: #8b1538;
    box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.1);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #eee;
}

/* Modal buttons with higher specificity and !important */
.modal-footer .btn-save,
button.btn-save {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 2rem !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
    font-family: inherit !important;
}

.modal-footer .btn-save:hover,
button.btn-save:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea179 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4) !important;
}

.modal-footer .btn-save:active,
button.btn-save:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3) !important;
}

.modal-footer .btn-cancel,
button.btn-cancel {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 2rem !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
    font-family: inherit !important;
}

.modal-footer .btn-cancel:hover,
button.btn-cancel:hover {
    background: linear-gradient(135deg, #545b62 0%, #343a40 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4) !important;
}

.modal-footer .btn-cancel:active,
button.btn-cancel:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 10px rgba(108, 117, 125, 0.3) !important;
}

/* Mobile responsiveness for tutor class cards */
@media (max-width: 768px) {
    .tutor-class-card {
        padding: 1rem;
    }
    
    .class-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .class-meta {
        align-items: flex-start;
    }
    
    .class-info-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .info-item {
        justify-content: space-between;
    }
    
    .info-item .value {
        text-align: right;
    }
    
    .btn-edit-location {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        margin-right: 0.25rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn-save,
    .modal-footer .btn-cancel {
        width: 100%;
    }
}

/* Student meeting details section */
.class-meeting-details {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(139, 21, 56, 0.08);
    border-radius: 8px;
    border-left: 3px solid #8b1538;
}

.class-meeting-details .meeting-info {
    margin-top: 0.5rem;
}

.class-meeting-details .meeting-info p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
}

.meeting-link {
    color: #8b1538;
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
    display: block;
    padding: 0.5rem 0.75rem;
    background: rgba(139, 21, 56, 0.1);
    border-radius: 4px;
    margin-top: 0.5rem;
    transition: background-color 0.2s ease;
}

.meeting-link:hover {
    background: rgba(139, 21, 56, 0.15);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .class-meeting-details {
        padding: 0.5rem;
        margin-top: 0.75rem;
    }
    
    .meeting-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
}

/* Meeting link box styling */
.meeting-link-box {
    margin: 1rem 0 0.5rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.meeting-link-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.meeting-link-box strong {
    display: block;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.meeting-link-url {
    display: inline-block;
    color: #fff;
    background: linear-gradient(135deg, #8b1538 0%, #6f1229 100%);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(139, 21, 56, 0.3);
    word-break: break-all;
    width: 100%;
    text-align: center;
    margin-top: 0.25rem;
}

.meeting-link-url:hover {
    background: linear-gradient(135deg, #6f1229 0%, #5a0f21 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(139, 21, 56, 0.4);
    color: #fff;
    text-decoration: none;
}

.meeting-point-text {
    display: inline-block;
    color: #495057;
    background: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    border: 2px solid #8b1538;
    width: 100%;
    text-align: center;
    margin-top: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.meeting-link-box.pending {
    background: linear-gradient(135deg, #fff3cd 0%, #fef8e7 100%);
    border-color: #ffc107;
}

.meeting-pending-text {
    display: block;
    color: #856404;
    font-style: italic;
    font-size: 0.9rem;
    text-align: center;
    padding: 0.5rem;
}

/* Meeting link with copy button styles */
.meeting-link-section .delivery-value-with-copy {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 0.5rem !important;
}

.meeting-link-section {
    width: 100% !important;
}

.delivery-value-with-copy .meeting-link-text {
    flex: 1 !important;
    word-break: break-all !important;
    min-width: 0 !important;
    margin-right: 0.5rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.copy-button.meeting-link-clickable {
    background: linear-gradient(135deg, #8b1538 0%, #6f1229 100%) !important;
    color: white !important;
    border: none !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(139, 21, 56, 0.3) !important;
    font-size: 1rem !important;
    flex-shrink: 0 !important;
    min-width: 44px !important;
    min-height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: auto !important;
}

.copy-button.meeting-link-clickable:hover {
    background: linear-gradient(135deg, #6f1229 0%, #5a0f21 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(139, 21, 56, 0.4) !important;
}

.copy-button.meeting-link-clickable.copied {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.copy-button.meeting-link-clickable.copied::after {
    content: "✓" !important;
}

.copy-button.meeting-link-clickable.copied {
    animation: copySuccess 0.3s ease !important;
}

@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Meeting point display styles */
.meeting-point-display {
    display: flex;
    align-items: center;
    background: #fff;
    color: #495057;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 2px solid #8b1538;
    margin-top: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.meeting-point-display .location-icon {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.meeting-point-display .point-text {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .meeting-link-box {
        margin: 0.75rem 0 0.25rem 0;
        padding: 0.75rem;
    }
    
    .meeting-link-url,
    .meeting-point-text {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .meeting-link-clickable,
    .meeting-point-display {
        padding: 0.6rem 0.8rem;
    }
    
    .meeting-link-clickable .copy-icon,
    .meeting-point-display .location-icon {
        margin-right: 0.5rem;
        font-size: 1rem;
    }
    
    .meeting-link-clickable .link-text,
    .meeting-point-display .point-text {
        font-size: 0.85rem;
    }
    
    .delivery-value-with-copy {
        gap: 0.5rem !important;
    }
    
    .delivery-value-with-copy .meeting-link-text {
        font-size: 0.85rem !important;
        margin-right: 0.25rem !important;
    }
    
    .copy-button.meeting-link-clickable {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.9rem !important;
        min-width: 40px !important;
        min-height: 32px !important;
    }
}

/* Location info messages for booking form */
.location-info-message {
    margin-top: 0.5rem;
}

.info-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
    border-left: 4px solid;
}

.info-message.info-online {
    background: rgba(33, 150, 243, 0.1);
    border-left-color: #2196F3;
    color: #1565C0;
}

.info-message.info-campus {
    background: rgba(139, 69, 19, 0.1);
    border-left-color: #8B4513;
    color: #6F360F;
}

.info-message i {
    font-style: italic;
    display: block;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .info-message {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Tutor meeting edit button styles */
.tutor-meeting-section {
    padding: 0.75rem 0;
    text-align: right;
}

.btn-edit-meeting {
    background: linear-gradient(135deg, #8b1538 0%, #6f1229 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(139, 21, 56, 0.3);
}

.btn-edit-meeting:hover {
    background: linear-gradient(135deg, #6f1229 0%, #5a0f21 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(139, 21, 56, 0.4);
}

/* Meeting input fields for private bookings */
.meeting-input {
    width: 100% !important;
    padding: 0.6rem 0.8rem !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
    background: white !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    margin-top: 0.25rem !important;
}

.meeting-input:focus {
    outline: none !important;
    border-color: #8b1538 !important;
    box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.1) !important;
}

.meeting-input::placeholder {
    color: #999 !important;
    font-style: italic !important;
}

.pending-text {
    color: #666 !important;
    font-style: italic !important;
    font-size: 0.85rem !important;
    margin-top: 0.25rem !important;
    display: block !important;
}

/* Location section styling */
.location-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.3rem !important;
    width: 100% !important;
}

.main-location-label {
    font-weight: 600 !important;
    color: #8b1538 !important;
    font-size: 0.9rem !important;
    padding: 0.2rem 0 !important;
    border-bottom: 1px solid #eee !important;
    margin-bottom: 0.2rem !important;
}

.readonly-meeting-info {
    padding: 0.6rem 0.8rem !important;
    background: #f8f9fa !important;
    border: 2px solid #e9ecef !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
    color: #495057 !important;
    margin-top: 0.25rem !important;
    font-style: italic !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .tutor-meeting-section {
        text-align: center;
        padding: 0.5rem 0;
    }
    
    .btn-edit-meeting {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        width: 100%;
    }
    
    .meeting-input {
        padding: 0.5rem 0.6rem !important;
        font-size: 0.85rem !important;
    }
    
    .main-location-label {
        font-size: 0.85rem !important;
        text-align: center !important;
    }
}