#inity-job-application-form input,
#inity-job-application-form textarea,
#inity-job-application-form select {
    display: flex;
    padding: 0.5rem 0.75rem;
    align-items: center;
    gap: 0.25rem;
    align-self: stretch;
    border-radius: 0.25rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 0.9375rem;
    line-height: 1.5;
}

#inity-job-application-form input:focus,
#inity-job-application-form textarea:focus,
#inity-job-application-form select:focus {
    outline: none;
    border-color: #73267E;
}

/* Error state styling */
#inity-job-application-form input.has-error,
#inity-job-application-form textarea.has-error,
#inity-job-application-form select.has-error {
    border-color: #EF4444;
}

#inity-job-application-form input.has-error:focus,
#inity-job-application-form textarea.has-error:focus,
#inity-job-application-form select.has-error:focus {
    border-color: #DC2626;
    outline: none;
}

#inity-job-application-form .form-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    flex: 1 0 0;
    margin-bottom: 1rem;
}

#inity-job-application-form .form-group .required {
    color: #73267E;
}

#inity-job-application-form .error-message {
    color: #dc2626;
    font-weight: 400;
    font-size: 0.8125rem;
    line-height: 1.4;
    margin-top: 0.375rem;
    display: block;
    width: 100%;
}

#inity-job-application-form .iti__country-container .iti__selected-country .iti__selected-dial-code {
    margin-right: 10px;
}

#inity-job-application-form button.iti__selected-country:focus {
    outline: none;
    border-color: #73267E;
}

#inity-job-application-form label {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 400;
    margin-bottom: 0.25rem;
}

#inity-job-application-form #iti-0__search-input {
    padding-left: 1.5rem;
    margin: 8px;
}

#inity-job-application-form .iti__search-icon {
    left: 1rem;
}

#inity-job-application-form #iti-0__dropdown-content {
    border-radius: 0.25rem;
    width: 100%;
    min-width: 250px;
}

#inity-job-application-form .iti__search-clear {
    right: 1rem;
}

#inity-job-application-form .iti__tel-input {
    width: 100%;
}

#inity-job-application-form .iti {
    width: 100%;
}

#inity-job-application-form .character-counter {
    font-size: 0.65rem;
    color: #6B7280;
    font-weight: 500;
    line-height: 1.5;
    text-align: right;
    width: 100%;
}

#inity-job-application-form .form-group {
    position: relative;
}

#inity-job-application-form #submit-btn{
    display: flex;
    height: 2.5rem;
    padding: 0.5rem 1.5rem;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    align-self: stretch;
    border-radius: 0.25rem;
    border: 1px solid #73267E;
    background: #73267E;
    color: #fff;
    margin-top: 0.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}
#inity-job-application-form #submit-btn:hover{
    background: #5a1d63;
}
#inity-job-application-form #submit-btn:disabled{
    background: #9ca3af;
    border-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}
#inity-job-application-form select{
    width: 100%;
}
#inity-job-application-form div.relative{
    width: 100%;
}

.checkbox-wrapper-42 input[type="checkbox"] {
    display: none;
    visibility: hidden;
    height: 0;
    width: 0;
}

.checkbox-wrapper-42 {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.checkbox-wrapper-42 label {
    display: inline-block;
}

.checkbox-wrapper-42 .cbx {
    position: relative;
    top: 1px;
    width: 16px;
    height: 16px;
    border: 1px solid #d1d5db;
    border-radius: 0.125rem;
    vertical-align: middle;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    cursor: pointer;
    order: 1;
}

.checkbox-wrapper-42 .cbx:after {
    content: '';
    position: absolute;
    top: 1px;
    left: 5px;
    width: 5px;
    height: 11px;
    opacity: 0;
    transform: rotate(45deg) scale(0);
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transition: all 0.3s ease;
    transition-delay: 0.15s;
}

.checkbox-wrapper-42 .lbl {
    margin-left: 5px;
    vertical-align: middle;
    cursor: pointer;
    order: 2; /* Drugi element */
}

.checkbox-wrapper-42 .lbl a {
    color: #2B0E2F;
    text-decoration: underline;
    transition: all 0.2s ease;
}
.checkbox-wrapper-42 .lbl a:hover {
    color: #9831A5;
}

.checkbox-wrapper-42 .lbl a:hover {
    opacity: 0.8;
}

.checkbox-wrapper-42 input[type="checkbox"]:checked~.cbx {
    border-color: #73267E;
    background: #73267E;
}

.checkbox-wrapper-42 input[type="checkbox"]:checked~.cbx:after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}

.checkbox-wrapper-42 .cntr {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    text-align: center;
}

@-moz-keyframes jelly-42 {
    from {
        transform: scale(1, 1);
    }

    30% {
        transform: scale(1.25, 0.75);
    }

    40% {
        transform: scale(0.75, 1.25);
    }

    50% {
        transform: scale(1.15, 0.85);
    }

    65% {
        transform: scale(0.95, 1.05);
    }

    75% {
        transform: scale(1.05, 0.95);
    }

    to {
        transform: scale(1, 1);
    }
}

@-webkit-keyframes jelly-42 {
    from {
        transform: scale(1, 1);
    }

    30% {
        transform: scale(1.25, 0.75);
    }

    40% {
        transform: scale(0.75, 1.25);
    }

    50% {
        transform: scale(1.15, 0.85);
    }

    65% {
        transform: scale(0.95, 1.05);
    }

    75% {
        transform: scale(1.05, 0.95);
    }

    to {
        transform: scale(1, 1);
    }
}

@-o-keyframes jelly-42 {
    from {
        transform: scale(1, 1);
    }

    30% {
        transform: scale(1.25, 0.75);
    }

    40% {
        transform: scale(0.75, 1.25);
    }

    50% {
        transform: scale(1.15, 0.85);
    }

    65% {
        transform: scale(0.95, 1.05);
    }

    75% {
        transform: scale(1.05, 0.95);
    }

    to {
        transform: scale(1, 1);
    }
}

@keyframes jelly-42 {
    from {
        transform: scale(1, 1);
    }

    30% {
        transform: scale(1.25, 0.75);
    }

    40% {
        transform: scale(0.75, 1.25);
    }

    50% {
        transform: scale(1.15, 0.85);
    }

    65% {
        transform: scale(0.95, 1.05);
    }

    75% {
        transform: scale(1.05, 0.95);
    }

    to {
        transform: scale(1, 1);
    }
}
#inity-job-application-form .form-row{
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    margin-bottom: 0;
}
@media (max-width: 768px) {
    #inity-job-application-form .form-row{
        flex-direction: column;
        margin-bottom: 1rem;
    }
}
.form-message {
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 0.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.875rem;
    line-height: 1.5;
}

.form-message .message-content {
    margin: 0;
}

.form-message.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

#file-selected{
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

/* Error message styling for checkbox */
.checkbox-wrapper-42 .error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
    width: 100%;
    order: 3; /* Ispod checkbox-a i teksta */
}

.checkbox-wrapper-42.error {
    border: 1px solid #dc2626;
    border-radius: 0.5rem;
    padding: 0.75rem;
    background-color: #fef2f2;
}

/* Fix for checkbox focusable issue */
.checkbox-wrapper-42 input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    overflow: hidden;
}

/* Ensure the checkbox is still focusable */
.checkbox-wrapper-42 input[type="checkbox"]:focus + .cbx {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Error state for select */
.form-group.error select {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.form-group.error select:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Phone input loading state */
#inity-job-application-form #phone[placeholder="Detecting country..."] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* File Upload Styles */
.file-upload-area {
    border: 1px dashed #d1d5db;
    border-radius: 0.25rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease;
    background: #fff;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-upload-area:hover {
    border-color: #73267E;
}

.file-upload-area.dragover {
    border-color: #73267E;
    background: #faf5ff;
}

.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.upload-icon {
    width: 2rem;
    height: 2rem;
    color: #7F56D9;
    margin-bottom: 0.5rem;
}

.upload-text {
    font-size: 0.875rem;
    font-weight: 400;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.upload-info {
    font-size: 0.75rem;
    color: #6B7280;
    margin: 0;
    display: none;
}

.file-selected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    margin-top: 0.5rem;
}

.file-name {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 400;
}

.remove-file {
    background: transparent;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    padding: 0.25rem 0.625rem;
    border-radius: 0.25rem;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-file:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
}

/* Error states for file upload */
.form-group.error .file-upload-area,
.form-group.error #cv-upload-area,
#cv-upload-area.error-state {
    border: 2px solid #ef4444 !important;
    background: #fef2f2 !important;
    animation: shake 0.4s ease-in-out;
}

.form-group.error .file-upload-area:hover,
.form-group.error #cv-upload-area:hover,
#cv-upload-area.error-state:hover {
    border: 2px solid #ef4444 !important;
    background: #fee2e2 !important;
}

/* Shake animation for errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Loading animation for submit button */
.button-loader {
    display: none;
}

.spinner {
    width: 1rem;
    height: 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

#submit-btn.loading .btn-text {
    display: none;
}

#submit-btn.loading .btn-loading {
    display: inline;
}