:root {
    --primary-color: #008500;
    --border-color: #333;
    --background-color: #ffffffff;
}

@font-face {
    font-family: 'DM Sans';
    src: url('../fonts/dm_sans.ttf') format('truetype');
}

*{
    font-family: "DM Sans", sans-serif;
}

body {
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    padding-top: 70px;
    position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url(../img/registerBG.jpeg);
  background-size: cover;
  opacity: 0.1; /* 👈 change this for transparency */
  z-index: -1;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: var(--background-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
}

.header .logo {
    height: 30px;
    width: auto;
}

/* Responsive header adjustments */
@media (max-width: 768px) {
    .header {
        padding: 0 20px;
    }

    .header .logo {
        height: 40px;
    }
}

.main-section {
    width: 100%;
    max-width: 500px;
    margin: auto;
    padding: 40px;
    background-color: var(--background-color);
    border-radius: 15px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
    z-index: 1;
    margin-top: 35px;
    
    /* Add margin to account for header */
}

.main-section img {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    display: block;
    margin-bottom: 40px;
}

.register-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 5%;
}

.register-header h2 {
    flex: 1;
    text-align: center;
    margin: 0;
    font-size: 1.64rem;
    color: #333;
    font-weight: 600;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #fff inset !important;
    /* Force white background */
    box-shadow: 0 0 0 30px #fff inset !important;
    /* Ensure consistency across browsers */
    -webkit-text-fill-color: #333 !important;
    /* Text color */
    background-color: #fff !important;
    /* Explicit background color */
}

.section {
    position: relative;
    text-align: center;
    display: none;
    margin-bottom: 30px;
    padding: 0 10px;
    z-index: 1;
}

.section::-webkit-scrollbar {
    width: 6px;
}

.section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.section::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.section::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.section.active {
    display: block;
}

.button-section {
    width: 100%;
    position: relative;
    margin: 0% auto;
    display: flex;
    justify-content: space-between;
    gap: 15px;

}

.button-section button {
    flex: 1;
}


.input-grid-1 {
    margin-bottom: 5px;
    gap: 20px !important;
}

.select-container .options {
    text-align: left;
}

.toggle-section {
    display: flex;
    justify-content: center;
    margin: 10px auto;
    margin-bottom: 40px;
    border: 1px solid #33300080;
    border-radius: 10px;
    padding: 5px;
}

.toggle-button {
    flex: 1;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    color: var(--border-color);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.toggle-button i {
    color: var(--border-color);
}

.toggle-button.active {
    background-color: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.toggle-button.active i {
    color: var(--background-color);
}

.hr-title-container {
    position: relative;
    text-align: center;
    width: 100%;
    max-width: 400px;
    margin: 10px auto;
    margin-top: 0px;
    margin-bottom: 25px;
}

.hr-title {
    position: relative;
    display: inline-block;
    background-color: var(--background-color);
    padding: 0 10px;
    margin: auto;
    font-size: 22px;
    font-weight: bold;
    color: var(--border-color);
    z-index: 1;
}

.hr-line {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    z-index: 0;
}

.profile-container {
    margin: 0 auto;
    width: fit-content;
    position: relative;
    margin-bottom: 40px;
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: var(--profilePhoto);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    border: 1px solid var(--primary-color);
}

.profile-photo i {
    font-size: 80px;
    color: var(--primary-color);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    margin-bottom: auto;
}

.profile-container .upload-button {
    font-size: 16px;
    border: none;
    border-radius: 50%;
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 25px;
    color: var(--primary-color);
    background-color: var(--background-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
}


/* Hide the file input */
.profile-container input[type="file"],
.nic-container input[type="file"] {
    display: none;
}

.nic-container {
    text-align: center;
    margin: 20px auto;
    position: relative;
    max-width: 86mm;
}

.nic-photo {
    max-width: 86mm;
    height: 54mm;
    background-color: var(--background-color);
    position: relative;
    overflow: hidden;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;

}

.nic-photo i {
    font-size: 50px;
    color: var(--primary-color);
    padding: 20px;
}

.nic-photo img {
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    /* Preserve original aspect ratio */
    display: none;

    margin-bottom: auto;
    /* Hidden by default */
}

.nic-container .upload-button {
    font-size: 16px;
    border-radius: 10px;
    position: absolute;
    bottom: 10px;
    right: 5px;
    cursor: pointer;
    scale: 0.8;
    transition: background-color 0.3s ease;
}

.accordion-item {
    margin: 0.5rem 0;
}

.accordion-item .accordion-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0rem 1rem;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: var(--background-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.accordion-item .accordion-title:hover {
    border-color: var(--primary-color);
    box-shadow: 0 3px 8px rgba(0, 133, 0, 0.15);
}

.accordion-item .accordion-title .title-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.accordion-item .accordion-title .title-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.accordion-item .accordion-title .close-btn {
    color: #666;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    background: none;
    border: none;
}

.accordion-item .accordion-title .close-btn:hover {
    color: #ff4444;
    background-color: rgba(255, 68, 68, 0.1);
}

.accordion-item .accordion-title span {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
}

.accordion-item .accordion-title i {
    color: #333;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.accordion-item .accordion-title i.rotated {
    transform: rotate(180deg);
}

.accordion-item .accordion-options {
    height: 0;
    overflow: hidden;
    padding: 0;
    margin: auto;
    transition: height 0.3s ease;
}

.accordion-item .accordion-options.active {
    height: auto;
    overflow: visible;
    padding: 0.5rem;
    padding-top: 1.5rem;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 16px;
    padding: 5px;
    z-index: 2;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.text-container {
    position: relative;
}

/* Validation tooltip styles */
.validation-tooltip {
    position: absolute;
    bottom: -30px;
    left: 0;
    background-color: #ff4444;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.validation-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 15px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #ff4444;
}

.validation-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.text-field.error {
    border-color: #ff4444 !important;
    box-shadow: 0 0 5px rgba(255, 68, 68, 0.3);
}

/* Password strength indicator styles */
.password-strength {
    margin-top: 8px;
    margin-bottom: 10px;
}

.password-strength-bar {
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-fill.very-weak {
    width: 20%;
    background-color: #ff4444;
}

.password-strength-fill.weak {
    width: 40%;
    background-color: #ff8800;
}

.password-strength-fill.medium {
    width: 60%;
    background-color: #ffaa00;
}

.password-strength-fill.strong {
    width: 80%;
    background-color: #88cc00;
}

.password-strength-fill.very-strong {
    width: 100%;
    background-color: #00aa00;
}

.password-strength-text {
    font-size: 12px;
    color: #666;
    text-align: left;
}

.password-strength-text.very-weak {
    color: #ff4444;
}

.password-strength-text.weak {
    color: #ff8800;
}

.password-strength-text.medium {
    color: #ffaa00;
}

.password-strength-text.strong {
    color: #88cc00;
}

.password-strength-text.very-strong {
    color: #00aa00;
}