/* ===========================
   WIDGET FORM CUSTOM CSS
   =========================== */

/* Container and Layout */
.npf_wgts .widget_container {
    max-width: 520px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.npf_wgts .form-custom {
    padding: 0;
}

/* Form Groups and Spacing */
.npf_wgts .form-group {
    margin-bottom: 24px;
    position: relative;
}

.npf_wgts .form-group.label-floating {
    margin-bottom: 28px;
}

/* Labels */
.npf_wgts .widget_label,
.npf_wgts .control-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: block;
    letter-spacing: 0.02em;
}

.npf_wgts .widget_label .required {
    color: #EF4444;
    font-weight: 700;
}

/* Input Fields */
.npf_wgts .widget_input,
.npf_wgts .form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    background-color: #FAFAFA;
    transition: all 0.3s ease;
    color: #1F2937;
    box-shadow: none !important;
    outline: none !important;
}

.npf_wgts .widget_input:focus,
.npf_wgts .form-control:focus {
    border-color: #3B82F6;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.npf_wgts .widget_input:hover,
.npf_wgts .form-control:hover {
    border-color: #9CA3AF;
}

/* Placeholder Styling */
.npf_wgts .widget_input::placeholder,
.npf_wgts .form-control::placeholder {
    color: #9CA3AF;
    font-size: 14px;
}

/* Select Dropdowns */
.npf_wgts select.widget_input,
.npf_wgts select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 42px;
    cursor: pointer;
}

/* Mobile Number Field with Country Code */
.npf_wgts .merge_field_div {
    position: relative;
}

.npf_wgts .merge_field_div .widget_label {
    margin-bottom: 8px;
}

.npf_wgts .merge_field_div .input-group {
    display: flex;
    align-items: stretch;
}

.npf_wgts .input-group-btn {
    position: relative;
}

.npf_wgts .bs-dropdown-to-select {
    padding: 12px 16px;
    font-size: 15px;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px 0 0 10px;
    background-color: #F3F4F6;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
    color: #374151;
    border-right: none;
}

.npf_wgts .bs-dropdown-to-select:hover {
    background-color: #E5E7EB;
}

.npf_wgts .bs-dropdown-to-select .caret {
    margin-left: 4px;
    border-top-color: #6B7280;
}

.npf_wgts .Mobile .input.tel {
    flex: 1;
}

.npf_wgts .Mobile .input.tel input {
    border-radius: 0 10px 10px 0;
    border-left: none;
}

/* Dropdown Menu for Country Codes */
.npf_wgts .dropdown-menu.show_dial_code_option {
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #E5E7EB;
    padding: 8px 0;
    max-height: 300px;
    overflow-y: auto;
}

.npf_wgts .search_box_code {
    width: calc(100% - 16px);
    margin: 0 8px 8px 8px;
    padding: 8px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: 14px;
}

.npf_wgts .dropdown-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.npf_wgts .dropdown-menu-list li {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: background-color 0.2s;
}

.npf_wgts .dropdown-menu-list li:hover {
    background-color: #F3F4F6;
}

/* Captcha Section */
.npf_wgts .npf_cpt_new {
    background-color: #F9FAFB;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.npf_wgts .cptImgBox {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.npf_wgts .cptImgBox img {
    border-radius: 8px;
    border: 2px solid #E5E7EB;
    height: 50px;
}

.npf_wgts .CaptchaRefreshBtn {
    padding: 8px 16px;
    background-color: #3B82F6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.npf_wgts .CaptchaRefreshBtn:hover {
    background-color: #2563EB;
}

/* Agreement Checkbox */
.npf_wgts .agree-group {
    background-color: #F0F9FF;
    border: 1px solid #BFDBFE;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
}

.npf_wgts .agree-group .checkbox {
    margin: 0;
}

.npf_wgts .agree-group label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin: 0;
}

.npf_wgts .agree-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #3B82F6;
}

.npf_wgts .agree-condition {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.5;
    flex: 1;
}

/* Submit Button */
.npf_wgts .button-holder {
    text-align: center;
    padding-top: 12px;
}

.npf_wgts .btn-register,
.npf_wgts .btn-fill-blue {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    padding: 14px 48px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
    display: inline-block;
}

.npf_wgts .btn-register:hover,
.npf_wgts .btn-fill-blue:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.npf_wgts .btn-register:active,
.npf_wgts .btn-fill-blue:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.npf_wgts .btn-register:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
    box-shadow: none;
}

/* Error States */
.npf_wgts .has-error .widget_input,
.npf_wgts .has-error .form-control {
    border-color: #EF4444;
    background-color: #FEF2F2;
}

.npf_wgts .has-error .widget_input:focus,
.npf_wgts .has-error .form-control:focus {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.npf_wgts .help-block {
    font-size: 13px;
    color: #EF4444;
    margin-top: 6px;
    display: none;
    animation: slideDown 0.3s ease;
}

.npf_wgts .has-error .help-block {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success Messages */
.npf_wgts .widget_thankyou_msg {
    background-color: #D1FAE5;
    border: 1px solid #6EE7B7;
    color: #065F46;
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 15px;
    margin-bottom: 20px;
    text-align: center;
}

/* Modal Styling */
.npf_wgts .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.npf_wgts .modal-header {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    border: none;
    padding: 20px 24px;
}

.npf_wgts .modal-title {
    font-size: 20px;
    font-weight: 600;
}

.npf_wgts .modal-header .close {
    color: white;
    opacity: 0.8;
    font-size: 24px;
    transition: opacity 0.3s;
}

.npf_wgts .modal-header .close:hover {
    opacity: 1;
}

/* Loading States */
.npf_wgts .widget_input.loading,
.npf_wgts .form-control.loading {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cstyle%3E.spinner%7Banimation:rotate 2s linear infinite%7D.path%7Bstroke:%233B82F6;stroke-linecap:round;animation:dash 1.5s ease-in-out infinite%7D@keyframes rotate%7B100%25%7Btransform:rotate(360deg)%7D%7D@keyframes dash%7B0%25%7Bstroke-dasharray:1,150;stroke-dashoffset:0%7D50%25%7Bstroke-dasharray:90,150;stroke-dashoffset:-35%7D100%25%7Bstroke-dasharray:90,150;stroke-dashoffset:-124%7D%7D%3C/style%3E%3Cg class='spinner'%3E%3Ccircle class='path' cx='12' cy='12' r='10' fill='none' stroke-width='2'%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

/* Responsive Design */
@media (max-width: 576px) {
    .widget_container {
        padding: 20px;
        border-radius: 0;
        box-shadow: none;
    }
    
    .btn-register,
    .btn-fill-blue {
        width: 100%;
        padding: 16px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .widget_input,
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Focus Visible for Accessibility */
.npf_wgts .widget_input:focus-visible,
.npf_wgts .form-control:focus-visible,
.npf_wgts .btn-register:focus-visible,
.npf_wgts .CaptchaRefreshBtn:focus-visible {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Custom Scrollbar for Dropdowns */
.npf_wgts .dropdown-menu.show_dial_code_option::-webkit-scrollbar {
    width: 8px;
}

.npf_wgts .dropdown-menu.show_dial_code_option::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 4px;
}

.npf_wgts .dropdown-menu.show_dial_code_option::-webkit-scrollbar-thumb {
    background: #9CA3AF;
    border-radius: 4px;
}

.npf_wgts .dropdown-menu.show_dial_code_option::-webkit-scrollbar-thumb:hover {
    background: #6B7280;
}

/* Smooth Transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: ease-in-out;
    transition-duration: 0.2s;
}

/* Hide Hidden Fields */
.npf_wgts .form-group[style*="display:none"],
.npf_wgts .form-group[style*="display: none"] {
    display: none !important;
}