:root {
    --primary-green: #038c25;
    --secondary-green: #006a30;
    --light-green: rgba(3, 140, 37, 0.1);
}

body {
    /*background-image: url("images/gray-back.jpg");*/
    /*background-repeat: no-repeat;*/
    /*background-size: cover;*/
    font-family: "Poppins", sans-serif;
    min-height: 100vh;
}

/* Header styles */
#header {
    width: 60%;
    margin: auto;
}

.header {
    background-color: var(--primary-green);
    color: white;
    padding: 0.75rem 0;
}

.logo {
    width: 120px;
}

.site-btn {
    background-color: transparent;
    border: 1px solid white;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    transition: all 0.3s;
    text-decoration: none;
}

.site-btn:hover {
    border: 1px solid white;
    background-color: transparent;
    color: white;
}

/* Multi-step progress bar */
.progress-container {
    margin-bottom: 30px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.step {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ddd;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background-color: var(--primary-green);
    color: white;
}

.step.completed .step-number {
    background-color: var(--secondary-green);
    color: white;
}

.step-title {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.step.active .step-title {
    color: var(--primary-green);
    font-weight: 600;
}

.step.completed .step-title {
    color: var(--secondary-green);
    font-weight: 600;
}

.step-line {
    height: 2px;
    background-color: #ddd;
    flex: 1;
    margin: 0 15px;
    transition: all 0.3s ease;
}

.step.completed + .step .step-line {
    background-color: var(--primary-green);
}

/* Container */
.container-m {
    width: 650px;
    margin: auto;
    padding-block: 30px;
}

/* Step content */
.step-content {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.step-content.active {
    display: block;
}

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

/* Rules step styles */
.rules-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.rules-title {
    color: var(--primary-green);
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
}

.rules-content {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 15px;
    margin-bottom: 20px;
}

.rules-content::-webkit-scrollbar {
    width: 6px;
}

.rules-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.rules-content::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 3px;
}

.rules-section {
    margin-bottom: 25px;
}

.rules-section h3 {
    color: var(--primary-green);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--light-green);
    padding-bottom: 5px;
}

.rules-section p, .rules-section li {
    color: #333;
    line-height: 1.6;
    margin-bottom: 8px;
}

.rules-section ul {
    padding-left: 20px;
}

.accept-rules-container {
    background: var(--light-green);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.accept-rules-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.custom-checkbox {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary-green);
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    position: relative;
    margin-top: 2px;
}

.custom-checkbox:checked {
    background-color: var(--primary-green);
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.checkbox-label {
    flex: 1;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

/* Form step styles */
.form-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-title {
    color: var(--primary-green);
    /*font-size: 24px;*/
    /*font-weight: 600;*/
    margin-bottom: 30px;
}

.form-input {
    height: 45px;
    border: 2px solid #ddd;
    color: #333;
    /*border-radius: 8px;*/
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(3, 140, 37, 0.25);
    outline: none;
}

.form-input::placeholder {
    color: #999;
}

.input-margin {
    margin-bottom: 25px;
}

/* Custom select styles */
.custom-select-container {
    position: relative;
    width: 100%;
    margin-bottom: 25px;
}

.custom-select {
    position: relative;
    width: 100%;
}

.select-display {
    width: 100%;
    height: 45px;
    border: 2px solid #ddd;
    background-color: white;
    padding: 12px;
    /*border-radius: 8px;*/
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-display:hover {
    border-color: var(--primary-green);
}

.custom-select.open .select-display {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(3, 140, 37, 0.25);
}

.selected-flag {
    width: 24px;
    height: 16px;
    margin-right: 10px;
    object-fit: cover;
    border-radius: 2px;
}

.selected-text {
    flex: 1;
    color: #999;
    font-family: "Poppins", sans-serif;
    font-size: 16px;
}

.select-arrow {
    color: var(--primary-green);
    transition: transform 0.3s ease;
}

.custom-select.open .select-arrow {
    transform: rotate(180deg);
}

.select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--primary-green);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow: hidden;
    z-index: 1000;
    display: none;
}

.custom-select.open .select-dropdown {
    display: block;
}

.search-container {
    position: relative;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.country-search {
    width: 100%;
    height: 40px;
    padding: 8px 35px 8px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.country-search:focus {
    border-color: var(--primary-green);
}

.search-icon {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.options-container {
    max-height: 200px;
    overflow-y: auto;
}

.country-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.country-option:hover {
    background-color: #f8f9fa;
}

.country-option.selected {
    background-color: var(--primary-green);
    color: white;
}

.option-flag {
    width: 24px;
    height: 16px;
    margin-right: 12px;
    object-fit: cover;
    border-radius: 2px;
}

.option-name {
    font-size: 14px;
    font-family: "Poppins", sans-serif;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Password container */
.password-container {
    position: relative;
    margin-bottom: 25px;
}

.toggle-password, .toggle-password-confirm {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--primary-green);
}

.password_note {
    font-size: 12px;
    color: #666;
    margin-top: -20px;
    margin-bottom: 20px;
    padding-left: 5px;
}

/* Buttons */
.btn-container {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-step {
    flex: 1;
    height: 50px;
    /*border-radius: 8px;*/
    font-weight: 600;
    text-transform: uppercase;
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-green);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--secondary-green);
}

.btn-primary:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.btn-secondary:hover {
    background-color: var(--primary-green);
    color: white;
}

.have-account {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.have-account a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
}

.have-account a:hover {
    text-decoration: underline;
}

/* Footer styles */
.footer {
    background-color: var(--primary-green);
    color: white;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    margin-top: 50px;
}

#footer {
    display: flex;
    justify-content: space-between;
    width: 60%;
    margin: auto;
}

.footer-item {
    font-size: 0.75rem;
    margin-top: 5px;
}

.social-icons {
    display: flex;
    justify-content: space-between;
}

.social-icons a {
    text-decoration: none;
    color: var(--primary-green);
    transition: color 0.3s ease;
}

.fab {
    font-family: "Font Awesome 6 Brands", serif !important;
    font-style: normal;
    font-size: 1.2rem;
    margin-right: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    border-radius: 50%;
    padding: 5px;
    width: 1.80rem;
    height: 1.80rem;
}

.social-icons a:hover {
    color: #005022;
}

.copyright {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.9;
    display: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container-m {
        width: 85%;
    }

    #header {
        width: 85%;
    }

    #footer {
        width: 85%;
    }
}

@media (max-width: 992px) {
    .container-m {
        width: 90%;
    }

    #header {
        width: 90%;
    }

    #footer {
        width: 90%;
    }
}

@media (max-width: 768px) {
    .container-m {
        width: 95%;
        padding-block: 20px;
    }

    /* Progress bar adjustments */
    .step-title {
        font-size: 12px;
    }

    .step-line {
        margin: 0 8px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
        margin-right: 8px;
    }

    /* Content containers */
    .rules-container,
    .form-container {
        padding: 20px;
        margin-bottom: 15px;
    }

    .rules-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .form-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    /* Rules content */
    .rules-content {
        max-height: 350px;
        padding-right: 10px;
    }

    .rules-section h3 {
        font-size: 16px;
    }

    .rules-section p, .rules-section li {
        font-size: 14px;
    }

    /* Form elements */
    .form-input,
    .select-display {
        height: 42px;
        font-size: 14px;
    }

    .form-input::placeholder {
        font-size: 14px;
    }

    .password_note {
        font-size: 11px;
        margin-bottom: 15px;
    }

    /* Buttons */
    .btn-container {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }

    .btn-step {
        width: 100%;
        height: 45px;
        font-size: 16px;
    }

    /* Accept policy */
    .accept-rules-container {
        padding: 15px;
    }

    .checkbox-label {
        font-size: 13px;
    }

    .custom-checkbox {
        width: 20px;
        height: 20px;
    }

    /* Header adjustments */
    #header {
        width: 95%;
    }

    .logo {
        width: 100px;
    }

    .site-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }

    /* Footer adjustments */
    #footer {
        width: 95%;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        text-align: center;
    }

    .footer-item {
        font-size: 0.7rem;
    }

    .footer-item:last-child {
        display: none;
    }

    .social-icons {
        justify-content: center;
        gap: 15px;
    }

    .copyright {
        display: block;
        font-size: 0.7rem;
    }

    .fab {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .container-m {
        width: 100%;
        padding: 15px;
    }

    /* Progress bar mobile */
    .progress-container {
        margin-bottom: 20px;
    }

    .step-title {
        display: none;
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 12px;
        margin-right: 0;
    }

    .step-line {
        margin: 0 5px;
    }

    /* Content containers mobile */
    .rules-container,
    .form-container {
        padding: 15px;
        border-radius: 8px;
    }

    .rules-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .form-title {
        font-size: 18px;
        margin-bottom: 20px;
    }

    /* Rules content mobile */
    .rules-content {
        max-height: 300px;
        padding-right: 5px;
        margin-bottom: 15px;
    }

    .rules-section {
        margin-bottom: 20px;
    }

    .rules-section h3 {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .rules-section p, .rules-section li {
        font-size: 13px;
        line-height: 1.5;
    }

    /* Form elements mobile */
    .form-input,
    .select-display {
        height: 40px;
        font-size: 13px;
        padding: 10px 12px;
    }

    .form-input::placeholder {
        font-size: 13px;
    }

    .input-margin {
        margin-bottom: 20px;
    }

    .password_note {
        font-size: 10px;
        margin-top: -15px;
        margin-bottom: 15px;
    }

    /* Password toggle buttons */
    .toggle-password,
    .toggle-password-confirm {
        right: 12px;
        font-size: 14px;
    }

    /* Custom select mobile */
    .selected-text,
    .option-name {
        font-size: 13px;
    }

    .country-search {
        height: 35px;
        font-size: 13px;
    }

    .country-option {
        padding: 10px 12px;
    }

    .selected-flag,
    .option-flag {
        width: 20px;
        height: 14px;
    }

    /* Accept policy mobile */
    .accept-rules-container {
        padding: 12px;
        margin-top: 15px;
    }

    .accept-rules-checkbox {
        gap: 10px;
    }

    .custom-checkbox {
        width: 18px;
        height: 18px;
        margin-top: 1px;
    }

    .custom-checkbox:checked::after {
        font-size: 12px;
    }

    .checkbox-label {
        font-size: 12px;
        line-height: 1.4;
    }

    /* Buttons mobile */
    .btn-container {
        margin-top: 15px;
        gap: 8px;
    }

    .btn-step {
        height: 42px;
        font-size: 16px;
        font-weight: 600;
    }

    /* Other elements */
    .have-account {
        font-size: 12px;
        margin-top: 15px;
    }

    /* Header mobile */
    #header {
        width: 100%;
        padding: 0 15px;
    }

    .header {
        padding: 0.6rem 0;
    }

    .logo {
        width: 80px;
    }

    .site-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.65rem;
        border-radius: 20px;
    }

    /* Footer mobile */
    #footer {
        width: 100%;
        padding: 0 15px;
    }

    .footer {
        padding: 1rem 0;
    }

    .footer-item {
        display: none;
    }

    .social-icons {
        gap: 12px;
    }

    .fab {
        width: 1.3rem;
        height: 1.3rem;
        font-size: 0.9rem;
        margin-right: 0;
    }

    .copyright {
        font-size: 0.65rem;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .container-m {
        padding: 10px;
    }

    .rules-container,
    .form-container {
        padding: 12px;
    }

    .rules-title {
        font-size: 18px;
    }

    .form-title {
        font-size: 16px;
    }

    .rules-content {
        max-height: 280px;
    }

    .form-input,
    .select-display {
        height: 38px;
        font-size: 12px;
    }

    .btn-step {
        height: 40px;
        font-size: 16px;
    }

    .checkbox-label {
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .rules-title {
        font-size: 16px;
    }

    .form-title {
        font-size: 15px;
    }

    .rules-section h3 {
        font-size: 14px;
    }

    .rules-section p, .rules-section li {
        font-size: 12px;
    }

    .form-input,
    .select-display {
        height: 36px;
        font-size: 11px;
    }

    .btn-step {
        height: 45px;
        font-size: 16px;
    }

    .checkbox-label {
        font-size: 10px;
    }
}

/**ITI**/
.iti {
    width: 100%;
    margin-bottom: 20px !important;
}

.iti .iti__selected-flag {
    background-color: lightgrey;
    /*border-radius: 5px;*/
    padding: 10px;
    height: 100%;
}

.iti__flag-container {
    padding-right: 10px;
}

input[type="tel"] {
    width: 100% !important;
    padding: 10px 10px 10px 100px !important;
    font-size: 16px;
    border: 1px solid #008000;
    /*border-radius: 5px;*/
    background-color: white;
    outline: none;
    position: relative;
}

/* Styles for phone validation */
.iti.phone-error input[type="tel"] {
    border-color: #dc3545 !important;
}

.iti.phone-valid input[type="tel"] {
    border-color: #28a745 !important;
}

.iti.phone-error {
    border: 2px solid #dc3545;
    border-radius: 5px;
}

.iti.phone-valid {
    border: 2px solid #28a745;
    border-radius: 5px;
}
