/* Global Styles */
:root {
  --primary-color: #6366f1;
  --secondary-color: #f8f9fa;
  --text-color: #333;
  --border-color: #e9ecef;
  --light-gray: #f8f9fa;
  --medium-gray: #dee2e6;
  --dark-gray: #6c757d;
  --success-color: #2ecc71;
  --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --border-radius: 16px;
  --icon-color: #4b5563;
}

/* Prevent FOUC */
body:not(.js-loaded) .profile-card,
body:not(.js-loaded) .accordion-item {
  opacity: 0;
}

/* Fix for iOS Safari bottom bar issues */
html {
  height: -webkit-fill-available;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  background-color: #e2e9fe;
  padding-bottom: 2rem;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  line-height: 1.5;
  padding: 0;
}

.container {
  max-width: 700px;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Header Styles */
.employee-profile-title {
  font-weight: 700;
  color: #333;
  font-size: 1.4rem;
  margin-top: 0.5rem;
  letter-spacing: -0.01em;
}

.breadcrumb-text {
  font-size: 0.85rem;
  color: #6c757d;
}

.creating-graphical {
  color: var(--primary-color);
}

.date-time {
  font-size: 0.85rem;
  color: #6c757d;
}

/* Profile Card */
.profile-card {
  background: #e9faff;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.profile-card.profile-loaded {
  opacity: 1;
  transform: translateY(0);
}

.profile-image-container {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto 1.8rem;
}

.profile-image {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background-color: #e9ecef;
  margin: 0 auto;
  overflow: hidden;
  /* background-image: url("https://ui-avatars.com/api/?name=Parmeshwar+Sahu&background=6366f1&color=fff&size=130&rounded=true&bold=true"); */
  background-size: cover;
  background-position: center;
  border: 4px solid white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.edit-icon {
  position: absolute;
  right: 2px;
  bottom: 5px;
  width: 32px;
  height: 32px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s;
}

.edit-icon:hover {
  transform: scale(1.1);
}

.profile-name {
  font-weight: 700;
  margin-bottom: 0.4rem;
  font-size: 1.4rem;
  color: #222;
}

.employee-id {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
  background-color: #f8f9fa;
  display: inline-block;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.verified-icon {
  color: var(--success-color);
  margin-left: 5px;
}

.job-title {
  font-size: 1rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0;
  letter-spacing: 0.5px;
}

/* Accordion Styles */
.accordion {
  margin-bottom: 1.5rem;
}

.accordion-item {
  border: none;
  margin-bottom: 0.75rem;
  border-radius: var(--border-radius);
  overflow: hidden;
  background-color: #fff;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease,
    background-color 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.accordion-item.accordion-item-loaded {
  opacity: 1;
  transform: translateY(0);
}

.highlight-accordion {
  box-shadow: 0 4px 25px rgba(99, 102, 241, 0.15);
  background-color: rgba(99, 102, 241, 0.02);
}

.accordion-button {
  padding: 1.2rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  background-color: white;
  border: none;
  box-shadow: none;
  color: #444;
  border-radius: var(--border-radius) !important;
}

.accordion-button:not(.collapsed) {
  color: var(--primary-color);
  font-weight: 600;
  background-color: white;
  box-shadow: none;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.accordion-button:focus {
  box-shadow: none;
  border-color: rgba(99, 102, 241, 0.25);
}

.accordion-button:hover {
  background-color: rgba(99, 102, 241, 0.02);
}

.accordion-button::after {
  background-size: 16px;
  opacity: 0.7;
}

.accordion-body {
  padding: 1.5rem;
  background-color: white;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Updated Accordion Headers with Icons */
.accordion-button .info-card-icon {
  width: 36px;
  height: 36px;
  background-color: #f3f4f8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.accordion-button .info-card-icon i {
  color: var(--icon-color);
  font-size: 1rem;
}

/* Information display in accordion */
.info-section {
  margin-bottom: 1.2rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.info-row:last-child {
  border-bottom: none;
}

.info-item {
  display: flex;
  margin-bottom: 1.2rem;
  align-items: flex-start;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-icon {
  width: 38px;
  height: 38px;
  background-color: rgba(99, 102, 241, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  margin-right: 15px;
  flex-shrink: 0;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.1);
}

.info-detail {
  flex: 1;
  padding-top: 0.25rem;
}

.info-label {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
  letter-spacing: 0.3px;
}

.info-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: #444;
}

.status-active {
  color: var(--success-color);
  font-weight: 600;
}

/* Edit button in accordion sections */
.edit-button-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.2rem;
}

.edit-section-btn {
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  background-color: rgba(99, 102, 241, 0.08);
  color: var(--primary-color);
  border: 1px solid rgba(99, 102, 241, 0.15);
  transition: all 0.2s;
}

.edit-section-btn:hover {
  background-color: rgba(99, 102, 241, 0.12);
  color: var(--primary-color);
  border-color: rgba(99, 102, 241, 0.25);
}

/* Payslips and documents styling */
.payslip-item,
.document-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background-color 0.2s;
}

.payslip-item:hover,
.document-item:hover {
  background-color: rgba(99, 102, 241, 0.03);
}

.payslip-item:last-child,
.document-item:last-child {
  border-bottom: none;
}

.payslip-item a,
.document-item a {
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
  border-radius: 5px;
  color: var(--primary-color);
  border: 1px solid rgba(99, 102, 241, 0.2);
  background-color: rgba(99, 102, 241, 0.05);
  transition: all 0.2s;
}

.payslip-item a:hover,
.document-item a:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.upload-button-wrapper {
  margin-top: 1.25rem;
}

.upload-button-wrapper .btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

.upload-button-wrapper .btn-primary:hover {
  background-color: #4f46e5;
  border-color: #4f46e5;
}

/* Modal Styles */
.modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.modal-header {
  border-bottom: 1px solid #e9ecef;
  padding: 1.5rem 1.75rem 1.25rem;
}

.modal-title {
  font-weight: 700;
  color: #333;
  font-size: 1.25rem;
}

.modal-body {
  padding: 1.75rem;
}

.modal-footer {
  border-top: 1px solid #e9ecef;
  padding: 1.25rem 1.75rem;
}

/* Form Section Styles */
.form-section {
  transition: opacity 0.3s ease;
}

.form-section.d-none {
  display: none !important;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.4rem;
}

.form-control,
.form-select {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
  transition: all 0.25s;
}

.form-control:hover,
.form-select:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
}

.modal-footer .btn-secondary {
  background-color: #f8f9fa;
  color: #444;
  border-color: #dee2e6;
  font-weight: 500;
}

.modal-footer .btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 500;
}

.modal-footer .btn-primary:hover {
  background-color: #4f46e5;
  border-color: #4f46e5;
}

/* Improve buttons */
.btn-primary {
  transition: all 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 0;
  z-index: 9999;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  border-left: 4px solid var(--success-color);
  overflow: hidden;
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

.notification-content {
  display: flex;
  align-items: center;
  padding: 15px 20px;
}

.notification-icon {
  color: var(--success-color);
  font-size: 1.25rem;
  margin-right: 12px;
}

.accordion-border{
  border-radius: 2px 2px 10px 10px;
}
/* Responsive adjustments */
@media (max-width: 767.98px) {
  .profile-card {
    margin-bottom: 1.5rem;
    padding: 1.5rem 1rem;
  }

  .accordion-body {
    padding: 1.25rem;
  }

  .info-label,
  .info-value {
    font-size: 0.9rem;
  }

  .info-section .info-row {
    flex-direction: column;
    padding: 0.75rem 0;
  }

  .info-section .info-label {
    margin-bottom: 0.35rem;
    font-weight: 500;
  }

  .edit-section-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 575.98px) {
  body {
    padding-top: 0.75rem;
    padding-bottom: 5rem;
  }

  .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1rem;
  }

  .date-time {
    margin-top: 0.5rem;
  }

  /* Accordion styling fixes */
  .accordion-item {
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  .accordion-button {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
  }

  .accordion-button .info-card-icon {
    width: 32px;
    height: 32px;
  }

  .accordion-body {
    padding: 1.25rem;
  }

  /* Enhanced info display on mobile */
  .info-row {
    padding: 0.85rem 0;
  }

  .info-section .info-row {
    flex-direction: column;
  }

  .info-section .info-label {
    margin-bottom: 0.35rem;
    font-weight: 500;
    color: #6c757d;
    font-size: 0.8rem;
  }

  .info-section .info-value {
    font-weight: 500;
    font-size: 0.95rem;
  }

  /* Profile card mobile improvements */
  .profile-card {
    border-radius: 14px;
    margin-bottom: 1.25rem;
    padding: 1.75rem 1.25rem 1.5rem;
  }

  .profile-image-container {
    width: 110px;
    height: 110px;
    margin-bottom: 1.5rem;
  }

  .profile-image {
    width: 110px;
    height: 110px;
  }

  .profile-name {
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
  }

  .job-title {
    font-size: 0.95rem;
    margin-top: 0.25rem;
  }

  /* Better form controls for touch */
  .form-control,
  .form-select,
  .btn {
    min-height: 38px;
    font-size: 16px; /* Prevents iOS zoom on focus */
  }

  /* Notification position fix */
  .notification {
    left: 20px;
    right: 20px;
    width: auto;
  }

  /* Edit button enhancements */
  .edit-section-btn {
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    width: 100%;
    margin-top: 0.75rem;
  }

  /* Modal improvements for mobile */
  .modal-body {
    padding: 1.5rem 1.25rem;
  }

  .modal-footer {
    padding: 1.25rem;
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
    margin: 0 0 0.5rem 0 !important;
  }

  .modal-footer .btn:last-child {
    margin-bottom: 0 !important;
  }
}
