/* User Authentication System Styles */

/* Auth Modal Overlay */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.auth-modal-overlay.active {
    display: flex;
}

/* Auth Modal */
.auth-modal {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.auth-modal-header {
    padding: 24px 30px 0 30px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 20px;
}

.auth-modal-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.auth-modal-header p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

/* Modal Body */
.auth-modal-body {
    padding: 30px;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #039b99;
    box-shadow: 0 0 0 3px rgba(3, 155, 153, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Checkbox */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #039b99;
}

/* Submit Button */
.auth-submit-btn {
    background: linear-gradient(135deg, #039b99 0%, #027a7a 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.auth-submit-btn:hover {
    background: linear-gradient(135deg, #027a7a 0%, #016666 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(3, 155, 153, 0.3);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Social Login */
.social-login {
    margin-top: 24px;
    text-align: center;
}

.social-login p {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 16px;
    position: relative;
}

.social-login p::before,
.social-login p::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: #e5e7eb;
}

.social-login p::before {
    left: 0;
}

.social-login p::after {
    right: 0;
}

.social-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.social-btn:hover {
    border-color: #039b99;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-btn svg {
    width: 24px;
    height: 24px;
}

.social-btn.facebook svg {
    color: #1877f2;
}

.social-btn.google svg {
    color: #ea4335;
}

/* Form Toggle */
.form-toggle {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.form-toggle p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.form-toggle a {
    color: #039b99;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.form-toggle a:hover {
    text-decoration: underline;
}

/* Close Button */
.auth-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.auth-modal-close:hover {
    color: #374151;
    background: #f3f4f6;
}

/* Error/Success Messages */
.auth-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.auth-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-message.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Loading Spinner */
.auth-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* User Dashboard Styles */
.user-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.dashboard-header {
    background: linear-gradient(135deg, #039b99 0%, #027a7a 100%);
    color: white;
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 40px;
    text-align: center;
}

.dashboard-header h1 {
    margin: 0 0 8px 0;
    font-size: 32px;
    font-weight: 700;
}

.dashboard-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.dashboard-card h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-card h3 svg {
    width: 24px;
    height: 24px;
    color: #039b99;
}

/* Profile Section */
.profile-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #039b99;
}

.profile-info h4 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.profile-info p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

/* Profile Image Upload */
.profile-image-upload {
    margin-top: 20px;
    padding: 20px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-image-upload:hover {
    border-color: #039b99;
    background: #f0fdf4;
}

.profile-image-upload input[type="file"] {
    display: none;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: #9ca3af;
    margin-bottom: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-modal {
        width: 95%;
        margin: 20px;
    }
    
    .auth-modal-header,
    .auth-modal-body {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-section {
        flex-direction: column;
        text-align: center;
    }
    
    .social-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
  .auth-modal {
    width: 98vw;
    margin: 2vw 0;
    padding: 0;
    max-width: 340px;
    min-width: 0;
    border-radius: 10px;
  }
  .auth-modal-header, .auth-modal-body {
    padding: 8px 4px;
  }
  .auth-form {
    padding: 0;
  }
  .auth-form label {
    font-size: 12px;
    font-weight: 400;
    margin-bottom: 2px;
    color: #444;
  }
  .auth-form input {
    font-size: 14px;
    padding: 6px 8px;
    height: 32px;
    min-height: 32px;
    border-radius: 6px;
  }
  .auth-form button.auth-submit-btn {
    font-size: 14px;
    padding: 7px 0;
    min-height: 32px;
    border-radius: 6px;
    margin-top: 8px;
  }
  .auth-message {
    font-size: 12px;
    padding: 7px 8px;
    margin-bottom: 8px;
  }
  .form-row {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  .user-dropdown {
    min-width: 140px;
    right: 0;
    left: auto;
    font-size: 12px;
    margin-top: 2px;
  }
  .user-dropdown-header {
    padding: 8px 4px;
  }
  .user-dropdown-header .user-profile-image {
    width: 32px;
    height: 32px;
    margin-bottom: 2px;
  }
  .user-dropdown-header h4 {
    font-size: 12px;
  }
  .user-dropdown-header p {
    font-size: 10px;
  }
  .user-dropdown-menu a {
    font-size: 12px;
    padding: 7px 8px;
    gap: 6px;
  }
  .user-dropdown-menu a svg {
    width: 13px;
    height: 13px;
  }
}

/* Header User Button Styles */
.header-user-btn {
    position: relative;
}

.user-profile-image {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    z-index: 1000;
    display: none;
    margin-top: 8px;
}

.user-dropdown.active {
    display: block;
}

.user-dropdown-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
}

.user-dropdown-header .user-profile-image {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}

.user-dropdown-header h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.user-dropdown-header p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

.user-dropdown-menu {
    padding: 8px 0;
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.user-dropdown-menu a:hover {
    background: #f9fafb;
}

.user-dropdown-menu a svg {
    width: 16px;
    height: 16px;
    color: #6b7280;
}

.user-dropdown-menu .logout-link {
    color: #dc2626;
    border-top: 1px solid #e5e7eb;
    margin-top: 8px;
}

.user-dropdown-menu .logout-link svg {
    color: #dc2626;
}

.header-user-btn:hover .user-dropdown, .header-user-btn:focus .user-dropdown, .header-user-btn.active .user-dropdown {
    display: block;
}

@media (max-width: 992px) {
  .user-dropdown {
    right: auto;
    left: 0;
    min-width: 180px;
  }
} 