/* StuConnect Styles */

/* Main StuConnect Button */
.btn-stuconnect {
    background-color: white;
    color: #333;
    padding: 12px 24px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-stuconnect:hover {
    background-color: #f5f5f5;
    border-color: #4caf50;
    color: #4caf50;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.2);
}

.btn-stuconnect:active {
    transform: translateY(0);
}

/* Modal Overlay */
.stuconnect-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.stuconnect-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.stuconnect-modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.stuconnect-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.stuconnect-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s;
}

.stuconnect-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Modal Body */
.stuconnect-modal-body {
    padding: 32px;
}

/* Info Section */
.stuconnect-info {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.stuconnect-info h3 {
    margin: 0 0 12px 0;
    color: #4caf50;
    font-size: 18px;
}

.stuconnect-info p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

.stuconnect-info-highlight {
    background: #e8f5e9;
    padding: 16px;
    border-radius: 8px;
    margin-top: 12px;
    border-left: 4px solid #4caf50;
}

/* Volunteer Button */
.stuconnect-volunteer-section {
    text-align: center;
    margin-bottom: 32px;
}

.btn-volunteer {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-volunteer:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

/* Volunteers List */
.stuconnect-volunteers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stuconnect-volunteers-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.volunteers-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.volunteer-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.volunteer-card:hover {
    border-color: #4caf50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
    transform: translateY(-2px);
}

.volunteer-info h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 18px;
}

.volunteer-details {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.grade-badge {
    background: #4caf50;
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
}

.semester-info {
    color: #666;
    font-size: 14px;
}

.btn-chat {
    background: #4caf50;
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-chat:hover {
    background: #45a049;
    transform: scale(1.05);
}

.btn-chat-active {
    background: #2196F3;
    animation: pulse 2s infinite;
}

.btn-chat-active:hover {
    background: #1976D2;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(33, 150, 243, 0);
    }
}

.no-volunteers {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Volunteer Form */
.stuconnect-volunteer-form {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10001;
}

.stuconnect-volunteer-form[style*="display: block"] {
    display: flex !important; /* Center when visible */
    align-items: center;
    justify-content: center;
}

.volunteer-form-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.volunteer-form-header {
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
    background: #4caf50;
    color: white;
    border-radius: 16px 16px 0 0;
}

.volunteer-form-header h3 {
    margin: 0;
    font-size: 22px;
}

.volunteer-form-body {
    padding: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4caf50;
}

.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group-checkbox input[type="checkbox"] {
    width: auto;
}

/* Professor Search Autocomplete */
.professor-search-container {
    position: relative;
}

.professor-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #4caf50;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.professor-search-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.professor-search-item:hover {
    background: #f5f5f5;
}

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

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

.professor-department {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Selected Professors Chips */
.selected-professors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    min-height: 40px;
}

.professor-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #4caf50;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

.professor-chip-remove {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    transition: background 0.2s;
}

.professor-chip-remove:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Professor Search Results */
.professor-result {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #ecf0f1;
    transition: background-color 0.2s;
}

.professor-result:hover {
    background-color: #ecf0f1;
}

.professor-result:last-child {
    border-bottom: none;
}

.professor-result-name {
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.professor-result-dept {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 2px;
}

.no-results {
    padding: 15px;
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-primary {
    background: #4caf50;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #45a049;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    padding: 12px 24px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Chat Modal */
.stuconnect-chat-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10002;
    align-items: center;
    justify-content: center;
}

.stuconnect-chat-content {
    background: white;
    border-radius: 16px;
    max-width: 700px;
    width: 90%;
    height: 80vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.stuconnect-chat-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #4caf50;
    color: white;
    border-radius: 16px 16px 0 0;
}

.stuconnect-chat-header h3 {
    margin: 0;
    font-size: 20px;
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #f9f9f9;
}

.chat-message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.chat-message.sent {
    align-items: flex-end;
}

.chat-message.received {
    align-items: flex-start;
}

.message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 70%;
    word-wrap: break-word;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.chat-message.sent .message-content {
    background: #4caf50;
    color: white;
}

.flagged-badge {
    display: inline-block;
    margin-left: 8px;
    font-size: 12px;
    background: #ff9800;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.no-messages {
    text-align: center;
    padding: 40px;
    color: #999;
}

.chat-input-container {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    background: white;
    border-radius: 0 0 16px 16px;
}

.chat-input-container textarea {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    min-height: 44px;
    max-height: 120px;
}

.chat-input-container textarea:focus {
    outline: none;
    border-color: #4caf50;
}

.chat-input-container button {
    background: #4caf50;
    color: white;
    padding: 0 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-input-container button:hover {
    background: #45a049;
}

/* Signup Prompt */
.signup-prompt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10003;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signup-prompt-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.signup-prompt-content h3 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 24px;
}

.signup-prompt-content p {
    margin: 0 0 24px 0;
    color: #666;
    line-height: 1.6;
}

.signup-prompt-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Notifications */
.stuconnect-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 10004;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stuconnect-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.stuconnect-notification.success {
    background: #4caf50;
}

.stuconnect-notification.error {
    background: #f44336;
}

.stuconnect-notification.warning {
    background: #ff9800;
}

.stuconnect-notification.info {
    background: #2196f3;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .stuconnect-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .stuconnect-modal-body {
        padding: 20px;
    }

    .volunteer-card {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .btn-chat {
        width: 100%;
    }

    .stuconnect-chat-content {
        width: 95%;
        height: 90vh;
    }

    .message-content {
        max-width: 85%;
    }

    .btn-stuconnect {
        width: 100%;
        justify-content: center;
        font-size: 14px;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .stuconnect-modal-header h2 {
        font-size: 20px;
    }

    .stuconnect-modal-body {
        padding: 16px;
    }

    .stuconnect-notification {
        right: 10px;
        left: 10px;
        top: 10px;
    }
}
