/* Teacher System Styles - Facebook-like Profile Design */

/* Login and Registration Forms */
.teacher-login-container,
.teacher-register-container {
    display: flex;
    align-items: center;
}

.teacher-login-container .card,
.teacher-register-container .card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.teacher-login-container .card-header,
.teacher-register-container .card-header {
    border-radius: 15px 15px 0 0 !important;
    padding: 20px;
}

.teacher-login-container .form-control:focus,
.teacher-register-container .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    border-color: #80bdff;
}

/* Dashboard Styles */
.teacher-dashboard-container {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Cover Photo Section */
.cover-photo-section {
    position: relative;
    background: #fff;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cover-photo {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

/* Default Avatar/Cover Placeholders */
.default-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
}

.default-cover {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 50%, #74b9ff 100%);
    position: relative;
}

.default-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}

.cover-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
}

.change-cover-btn {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9) !important;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
}

/* Profile Header */
.profile-header {
    position: relative;
    top: -80px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    padding: 0 20px;
}

.profile-info {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex: 1;
}

.profile-picture-container {
    position: relative;
}

.profile-picture {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 6px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    object-fit: cover;
}

.profile-picture-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-picture-overlay button {
    border: none;
    background: transparent;
    color: white;
    padding: 0;
}

.profile-details {
    margin-bottom: 10px;
}

.profile-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: #1c1e21;
    line-height: 1.2;
}

.profile-name-bangla {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 5px 0;
    color: #65676b;
    font-family: 'Kalpurush', sans-serif;
}

.profile-designation {
    font-size: 1.2rem;
    color: #65676b;
    margin: 10px 0;
    font-weight: 500;
}

.profile-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    color: #65676b;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.profile-actions .btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Dashboard Content */
.teacher-dashboard-container .container {
    margin-top: -60px;
}

.teacher-dashboard-container .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.teacher-dashboard-container .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px 12px 0 0 !important;
    padding: 15px 20px;
}

.teacher-dashboard-container .card-header.bg-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
}

.teacher-dashboard-container .card-header.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.teacher-dashboard-container .card-header.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
}

.teacher-dashboard-container .card-header.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
}

.teacher-dashboard-container .card-body {
    padding: 20px;
}

.info-item {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.95rem;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item strong {
    color: #495057;
    font-weight: 600;
}

/* Table Styles */
.table {
    font-size: 0.9rem;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
}

/* Academic Information Styles */
.academic-row {
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.academic-row:hover {
    background: #e9ecef;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 20px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 15px 20px;
}

/* Form Styles */
.form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 10px 12px;
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 10px 12px;
}

.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border: 2px solid #007bff;
    color: #007bff;
}

.btn-outline-primary:hover {
    background: #007bff;
    transform: translateY(-1px);
}

.btn-outline-danger {
    border: 2px solid #dc3545;
    color: #dc3545;
}

.btn-outline-danger:hover {
    background: #dc3545;
    transform: translateY(-1px);
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
    border-left: 4px solid #28a745;
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(200, 35, 51, 0.1) 100%);
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(224, 168, 0, 0.1) 100%);
    border-left: 4px solid #ffc107;
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(19, 132, 150, 0.1) 100%);
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.5s ease;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
        padding: 0 15px;
    }
    
    .profile-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .profile-name {
        font-size: 2rem;
    }
    
    .profile-name-bangla {
        font-size: 1.5rem;
    }
    
    .profile-picture {
        width: 150px;
        height: 150px;
    }
    
    .cover-photo {
        height: 250px;
    }
    
    .profile-actions {
        width: 100%;
        justify-content: center;
    }
    
    .profile-actions .btn {
        flex: 1;
        min-width: 140px;
    }
    
    .profile-stats {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .cover-photo {
        height: 200px;
    }
    
    .profile-header {
        top: -60px;
    }
    
    .profile-picture {
        width: 120px;
        height: 120px;
    }
    
    .profile-name {
        font-size: 1.8rem;
    }
    
    .profile-name-bangla {
        font-size: 1.3rem;
    }
    
    .teacher-dashboard-container .container {
        margin-top: -40px;
    }
    
    .profile-actions .btn {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
    
    .card-body {
        padding: 15px !important;
    }
    
    .modal-dialog {
        margin: 10px;
    }
}

/* Modal Fixes - Simplified */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    display: none;
}

.modal.show {
    display: block !important;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    opacity: 0;
    display: none;
}

.modal-backdrop.show {
    opacity: 0.5;
    display: block !important;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    pointer-events: none;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.2);
    border-radius: 0.3rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
    outline: 0;
}

.modal-open {
    overflow: hidden !important;
}

@media (min-width: 576px) {
    .modal-dialog {
        max-width: 500px;
        margin: 1.75rem auto;
    }
}

/* Modal Header, Body, Footer */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: calc(0.3rem - 1px);
    border-top-right-radius: calc(0.3rem - 1px);
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
    border-bottom-right-radius: calc(0.3rem - 1px);
    border-bottom-left-radius: calc(0.3rem - 1px);
}

/* Close button */
.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: #000;
    opacity: 0.5;
    cursor: pointer;
    padding: 0;
    width: 1em;
    height: 1em;
    line-height: 1;
}

.btn-close:hover {
    opacity: 0.75;
}
