/**
 * Tutor Management Styles
 */

/* Modal Base Styles */
#tutorModal,
#inviteTutorModal {
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #1d1d1d;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    width: 85%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    color: #f0f0f0;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal .close {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    z-index: 1001;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.modal .close:hover {
    background-color: rgba(255, 0, 0, 0.7);
    transform: scale(1.1);
}

.modal-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #fff;
    text-align: center;
}

.modal-description {
    margin-bottom: 25px;
    text-align: center;
    font-size: 16px;
    color: #ccc;
}

/* Tutor Sections Styles */
.tutor-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.tutor-section {
    background-color: #2d2d2d;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.section-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #fff;
    border-bottom: 1px solid #444;
    padding-bottom: 12px;
}

/* New Tutor Table Styles */
.tutor-table-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #333;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 500;
    color: #aaa;
}

.tutor-column-header {
    font-size: 14px;
    padding: 0 10px;
}

.tutor-column-header.email2 {
    flex: 1.5;
}

.tutor-column-header.type {
    flex: 1;
}

.tutor-column-header.daily-report {
    flex: 1.5;
    text-align: center;
}

.tutor-column-header.actions {
    flex: 0.5;
}

.tutors-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tutor-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: #333;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: background-color 0.2s ease;
}

.tutor-item:hover {
    background-color: #3a3a3a;
}

.tutor-email {
    flex: 2.5;
    font-size: 14px;
    color: #fff;
    padding: 0 10px;
}

.tutor-type {
    flex: 1;
    font-size: 14px;
    color: #aaa;
    padding: 0 10px;
}

.tutor-toggle {
    flex: 1.5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.toggle-label {
    font-size: 14px;
    color: #ccc;
    /* This label might be removed if the header "Send Daily Report" is used */
}

.tutor-actions {
    flex: 0.5;
    display: flex;
    justify-content: flex-end;
    padding: 0 10px;
}

.delete-tutor {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    padding: 6px;
    border-radius: 4px;
}

.delete-tutor:hover {
    opacity: 1;
    background-color: rgba(255, 0, 0, 0.1);
}

.delete-tutor img {
    width: 18px;
    height: 18px;
    filter: invert(100%);
}

.no-tutors, .loading-tutors, .error-message {
    text-align: center;
    padding: 15px;
    font-size: 14px;
    color: #888;
}

.error-message {
    color: #f44336;
}

/* Invite Form Styles */
.invite-form {
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.form-input {
    flex: 1;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #444;
    background-color: #333;
    color: #fff;
    font-size: 14px;
}

.form-select {
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #444;
    background-color: #333;
    color: #fff;
    font-size: 14px;
    min-width: 120px;
}

.add-button, .remove-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-button {
    background-color: #4CAF50;
}

.remove-button {
    background-color: #f44336;
}

.add-button:hover, .remove-button:hover {
    transform: scale(1.1);
}

/* Modal Action Buttons */
.tutor-actions, .modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.button {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.button.primary {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.button.primary:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

.button.secondary {
    background-color: #333;
    color: white;
    border: 1px solid #444;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.button:active {
    transform: translateY(0);
}

/* Toggle Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:focus + .slider {
    box-shadow: 0 0 1px #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .tutor-section {
        padding: 15px;
    }

    .tutor-item {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        gap: 15px;
    }

    .tutor-email,
    .tutor-type {
        text-align: center;
        padding: 5px 0;
    }

    .tutor-toggle {
        justify-content: center;
    }

    .tutor-actions {
        justify-content: center;
        padding: 5px 0;
    }

    .tutor-table-header {
        display: none;
    }
} 