/* Modal Overlay */
.jitsi-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.jitsi-modal-overlay.active {
    display: flex;
}

/* Modal Container */
.jitsi-modal {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

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

/* Modal Header */
.jitsi-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #4a5a4b;
}

.jitsi-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jitsi-modal-header .jitsi-modal-close {
    color: #ffffff;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.jitsi-modal-header .jitsi-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.jitsi-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

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

/* Modal Body */
.jitsi-modal-body {
    padding: 24px;
}

/* Form Elements */
.jitsi-form-group {
    margin-bottom: 20px;
}

.jitsi-form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #444;
    font-size: 0.95rem;
}

.jitsi-form-input,
.jitsi-form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.jitsi-form-input:focus,
.jitsi-form-textarea:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.jitsi-form-textarea {
    resize: vertical;
    min-height: 80px;
}

.jitsi-form-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.85rem;
    color: #777;
}

/* Users Tags Input */
.jitsi-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    min-height: 44px;
    align-items: center;
    cursor: text;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.jitsi-tags-container:focus-within {
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.jitsi-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background-color: #e3f2fd;
    color: #1976d2;
    border-radius: 16px;
    font-size: 0.9rem;
}

.jitsi-tag-remove {
    background: none;
    border: none;
    color: #1976d2;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
}

.jitsi-tag-remove:hover {
    color: #0d47a1;
}

.jitsi-tags-input {
    border: none;
    outline: none;
    padding: 4px;
    flex: 1;
    min-width: 120px;
    font-size: 0.95rem;
}

/* Modal Footer */
.jitsi-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Buttons */
.jitsi-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.jitsi-btn:active {
    transform: scale(0.98);
}

.jitsi-btn-secondary {
    background-color: #f5f5f5;
    color: #333;
}

.jitsi-btn-secondary:hover {
    background-color: #e0e0e0;
}

.jitsi-btn-primary {
    background-color: #2196f3;
    color: white;
}

.jitsi-btn-primary:hover {
    background-color: #1976d2;
}

/* Pending Users List */
.pending-user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    background-color: #fafafa;
}

.pending-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pending-user-name {
    font-weight: 600;
    color: #333;
}

.pending-meeting-title {
    font-size: 0.85rem;
    color: #777;
}

.jitsi-btn-success {
    background-color: #4caf50;
    color: white;
}

.jitsi-btn-success:hover {
    background-color: #45a049;
}

.jitsi-btn-danger {
    background-color: #f44336;
    color: white;
}

.jitsi-btn-danger:hover {
    background-color: #da190b;
}

.jitsi-btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.enrollment-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-enrolled {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-pending {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-not-enrolled {
    background-color: #ffebee;
    color: #c62828;
}

.enrollment-btn {
    margin-left: 8px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Notification Modal */
.notification-modal {
    max-width: 400px;
}

.notification-modal .jitsi-modal-body {
    text-align: center;
    padding: 30px 20px;
}

.notification-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.notification-icon.success {
    color: #4caf50;
}

.notification-icon.error {
    color: #f44336;
}

.notification-icon.warning {
    color: #ff9800;
}

.notification-icon.info {
    color: #2196f3;
}

.notification-message {
    font-size: 1rem;
    color: #333;
    line-height: 1.5;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 20px 0;
}

.pagination-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background-color: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #f0f0f0;
}

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

.pagination-info {
    font-size: 0.9rem;
    color: #666;
}

/* Tabs */
.jitsi-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.jitsi-tab {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.jitsi-tab:hover {
    color: #2196f3;
    background-color: #f5f5f5;
}

.jitsi-tab.active {
    color: #2196f3;
    border-bottom-color: #2196f3;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Meetings list container with fixed height */
#meetings-list {
    min-height: 600px;
    max-height: 600px;
    overflow-y: auto;
}

/* Details modal */
.details-field {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.details-field:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.details-field strong {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.9rem;
}

.details-field div {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Calendar tab button inline */
.jitsi-tab-calendar-inline {
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    color: #666;
    font-size: 1rem;
    transition: all 0.3s;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.jitsi-tab-calendar-inline:hover {
    background-color: #4a5a4b;
    color: white;
    border-color: #4a5a4b;
}

.jitsi-tab.active .jitsi-tab-calendar-inline {
    border-color: #2196f3;
    color: #2196f3;
}

.jitsi-tab.active .jitsi-tab-calendar-inline:hover {
    background-color: #2196f3;
    color: white;
}

/* Calendar modal */
.calendar-modal {
    max-width: 700px;
    width: 90%;
}

/* Reduce calendar size for medium/large screens to avoid scroll */
@media (min-width: 426px) {
    .calendar-modal {
        max-width: 550px;
    }
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 10px;
}

.calendar-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

@media (min-width: 426px) {
    .calendar-header {
        margin-bottom: 12px;
    }
}

.calendar-nav-btn {
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
}

.calendar-nav-btn:hover {
    background-color: #f8f9fa;
    color: #4a5a4b;
    border-color: #4a5a4b;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 15px;
    width: 100%;
}

@media (min-width: 426px) {
    .calendar-grid {
        gap: 6px;
        margin-bottom: 12px;
    }
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    color: #666;
    padding: 8px;
    font-size: 0.85rem;
}

@media (min-width: 426px) {
    .calendar-day-header {
        padding: 6px;
        font-size: 0.8rem;
    }
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #fff;
    position: relative;
    padding: 4px;
    min-width: 0;
}

@media (min-width: 426px) {
    .calendar-day {
        padding: 3px;
        border-radius: 4px;
    }
}

.calendar-day:hover {
    border-color: #4a5a4b;
}

@media (min-width: 769px) {
    .calendar-day:hover {
        transform: scale(1.05);
    }
}

.calendar-day.has-trainings {
    background-color: rgba(74, 90, 75, 0.15);
    border-color: #4a5a4b;
    cursor: pointer;
}

.calendar-day.has-trainings:hover {
    background-color: rgba(74, 90, 75, 0.25);
}

.calendar-day.other-month {
    opacity: 0.3;
    pointer-events: none;
}

.calendar-day.today {
    border: 2px solid #4a5a4b;
    font-weight: 700;
}

.calendar-day-number {
    font-size: 0.85rem;
    color: #333;
}

@media (min-width: 426px) {
    .calendar-day-number {
        font-size: 0.8rem;
    }
}

.calendar-day-count {
    font-size: 0.65rem;
    color: #666;
    margin-top: 3px;
    background-color: #4a5a4b;
    color: white;
    padding: 2px 5px;
    border-radius: 8px;
}

@media (min-width: 426px) {
    .calendar-day-count {
        font-size: 0.6rem;
        margin-top: 2px;
        padding: 1px 4px;
    }
}

.calendar-legend {
    display: flex;
    gap: 15px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

@media (min-width: 426px) {
    .calendar-legend {
        padding: 6px;
        gap: 12px;
    }
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

/* Calendar tooltip */
.calendar-tooltip {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    max-width: 300px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.calendar-tooltip.show {
    opacity: 1;
}

.tooltip-training {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tooltip-training:last-child {
    border-bottom: none;
}

.tooltip-training-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: #ffffff;
}

.tooltip-training-time {
    font-size: 0.8rem;
    color: #cccccc;
}

/* Participants list */
.participants-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.participant-item i {
    font-size: 1.2rem;
}

.participant-item span {
    font-size: 0.95rem;
}

/* User selector */
.users-selector {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
}

.user-checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.user-checkbox-item:hover {
    background-color: #f5f5f5;
}

.user-checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
}

.user-checkbox-label {
    cursor: pointer;
    user-select: none;
}

/* Responsive */
@media (max-width: 768px) {
    .jitsi-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .jitsi-modal-header,
    .jitsi-modal-body,
    .jitsi-modal-footer {
        padding: 12px;
    }
    
    .pending-user-item {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .jitsi-tabs {
        flex-wrap: wrap;
    }
    
    .jitsi-tab {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
    
    .jitsi-tab-calendar-inline {
        padding: 3px 6px;
        font-size: 0.9rem;
    }
    
    /* Calendar responsive */
    .calendar-modal {
        width: 95%;
        max-width: none;
    }
    
    .calendar-grid {
        gap: 4px;
    }
    
    .calendar-day {
        padding: 2px;
        border-radius: 4px;
    }
    
    .calendar-day-number {
        font-size: 0.75rem;
    }
    
    .calendar-day-count {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
    
    .calendar-day-header {
        font-size: 0.75rem;
        padding: 6px 2px;
    }
    
    .calendar-header h4 {
        font-size: 1rem;
    }
    
    .calendar-nav-btn {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    
    .calendar-legend {
        flex-direction: column;
        gap: 8px;
    }
}
