.na-custom-form{
    margin: 2rem auto;
    max-width: 980px;
}

.na-custom-form .na-form{
    padding: 2rem;
    border: 1px solid #D0D0D0;
    border-radius: 12px;
}

.na-custom-form .na-form .na-fields-container label{
    margin: 1rem 0;
    font-family: "Inter";
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
}

.na-custom-form .na-form .na-fields-container label span ~ *{
    margin-top: 0.5rem;
    border-radius: 8px;
}

.na-custom-form .na-form .na-fields-container label:not(.flexed),
.na-custom-form .na-form .na-fields-container label:not(.flexed) input {
    display: block;
    width: 100%;

} 

.na-custom-form .na-form .na-fields-container div.flex-box{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.na-custom-form .na-form .na-fields-container div.flex-box label.flexed{
    width: 50%;
}

.na-custom-form .na-form .na-fields-container div.flex-box label.flexed input,
.na-custom-form .na-form .na-fields-container div.flex-box label.flexed select{
    width: 100%;
}

.na-custom-form .na-actions button{
    margin-top: 2rem;
    background: #000;
    color: #fff;
    font-family: "Inter";
    font-weight: 400 !important;
    border: 1px solid #fff;
    text-transform: none;
    letter-spacing: 0.4px;
    border-radius: 8px;
    padding: 8px 36px;
    font-size: 16px;
    line-height: 20px;
}

.na-custom-form .na-error-message{
    width: max-content;
    padding: 0.5rem 1rem;
    background-color: rgb(254, 225, 225);
    border: rgba(255, 0, 0, 0.726);
    border-radius: 4px;
    color: red;
    font-size: 16px;
}

.na-custom-form .na-actions.center{
    text-align: center;
}

.na-custom-form .na-actions.right{
    text-align: right;
}

/* Items Section Styling */
.na-items-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.na-items-section h4 {
    margin: 0 0 1rem 0;
    font-family: "Inter";
    font-weight: 600;
    font-size: 18px;
    color: #333;
}

.na-items-summary {
    margin-bottom: 1rem;
}

.na-items-count {
    font-family: "Inter";
    font-size: 14px;
    color: #666;
    margin: 0;
}

.na-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.na-items-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.na-items-list li:hover {
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0,123,255,0.1);
}

.na-item-content {
    flex: 1;
    font-family: "Inter";
    font-size: 14px;
}

.na-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: "Inter";
    font-size: 12px;
}

.na-item-actions a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.na-item-actions a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.na-item-added {
    animation: itemAdded 0.5s ease;
}

.na-item-editing {
    background: #fff3cd !important;
    border-color: #ffc107 !important;
    animation: itemEditing 0.3s ease;
}

@keyframes itemAdded {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes itemEditing {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Terms Section Styling */
.na-terms-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.na-terms-section h4 {
    margin: 0 0 1rem 0;
    font-family: "Inter";
    font-weight: 600;
    font-size: 18px;
    color: #333;
}

/* File Link Styling */
.na-file-link {
    color: #007bff;
    text-decoration: none;
    font-size: 12px;
    margin-left: 0.5rem;
}

.na-file-link:hover {
    text-decoration: underline;
}

.na-custom-form .na-thanks{
    margin-top: 2rem;
    padding: 2rem;
    background: transparent;
    border-radius: 8px;
    border: 1px solid #D0D0D0;
    text-align: center; 
}

.na-custom-form .na-thanks .na-help-line{
    margin-top: 1rem;
    font-size: 14px;
    color: #666;
}

.na-custom-form .na-step-3 h3{
    margin-top: 2rem;
}
/* ===== RESPONSIVE DESIGN ===== */

/* Tablet Styles (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .na-custom-form {
        margin: 1.5rem auto;
        max-width: 95%;
    }
    
    .na-custom-form .na-form {
        padding: 1.5rem;
    }

    .na-custom-form .na-form .na-fields-container label span ~ *{
        border-radius: 4px;
    }
    
    /* Content font-size 14px for tablet */
    .na-custom-form .na-form .na-fields-container label,
    .na-custom-form .na-form .na-fields-container input,
    .na-custom-form .na-form .na-fields-container select,
    .na-custom-form .na-form .na-fields-container textarea,
    .na-custom-form .na-error-message,
    .na-items-count,
    .na-item-content,
    .na-item-actions,
    .na-item-actions a,
    .na-custom-form .na-thanks p,
    .na-custom-form .na-thanks .na-help-line,
    .na-custom-form .na-step-description {
        font-size: 14px !important;
    }
    
    .na-custom-form .na-form .na-fields-container div.flex-box {
        gap: 1.5rem;
    }
    
    .na-custom-form .na-form .na-fields-container div.flex-box label.flexed {
        width: 48%;
    }
    
    .na-custom-form .na-actions button {
        padding: 10px 28px;
        font-size: 15px;
    }
    
    .na-items-section,
    .na-terms-section {
        padding: 1.25rem;
    }
    
    .na-items-list li {
        padding: 0.625rem;
    }
    
    .na-custom-form .na-thanks {
        padding: 1.5rem;
    }
}

/* Mobile Styles (320px - 767px) */
@media screen and (max-width: 767px) {
    .na-custom-form {
        margin: 1rem auto;
        max-width: 100%;
        padding: 0 0.5rem;
    }
    
    .na-custom-form .na-form {
        padding: 1rem;
        border-radius: 8px;
    }
    
    /* Content font-size 14px for mobile */
    .na-custom-form .na-form .na-fields-container label,
    .na-custom-form .na-form .na-fields-container input,
    .na-custom-form .na-form .na-fields-container select,
    .na-custom-form .na-form .na-fields-container textarea,
    .na-custom-form .na-error-message,
    .na-items-count,
    .na-item-content,
    .na-item-actions,
    .na-item-actions a,
    .na-custom-form .na-thanks p,
    .na-custom-form .na-thanks .na-help-line,
    .na-custom-form .na-step-description {
        font-size: 14px !important;
    }
    
    .na-custom-form .na-form .na-fields-container label {
        line-height: 22px;
        margin: 1rem 0;
    }
    
    /* Stack flex items vertically on mobile */
    .na-custom-form .na-form .na-fields-container div.flex-box {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .na-custom-form .na-form .na-fields-container div.flex-box label.flexed {
        width: 100%;
    }
    
    .na-custom-form .na-form .na-fields-container label span ~ * {
        margin-top: 0.375rem;
    }
    
    /* Adjust button styles for mobile */
    .na-custom-form .na-actions {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .na-custom-form .na-actions.center,
    .na-custom-form .na-actions.right {
        text-align: center;
    }
    
    .na-custom-form .na-actions button {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
        margin-top: 0;
        border-radius: 6px;
    }
    
    /* Adjust error message for mobile */
    .na-custom-form .na-error-message {
        width: 100%;
        padding: 0.75rem;
        text-align: center;
    }
    
    /* Adjust items section for mobile */
    .na-items-section,
    .na-terms-section {
        margin-top: 1.5rem;
        padding: 1rem;
        border-radius: 6px;
    }
    
    .na-items-section h4,
    .na-terms-section h4 {
        font-size: 16px;
        margin-bottom: 0.75rem;
    }
    
    .na-items-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .na-item-content {
        width: 100%;
    }
    
    .na-item-actions {
        width: 100%;
        justify-content: flex-end;
        gap: 0.75rem;
    }
    
    .na-item-actions a {
        padding: 0.25rem 0.5rem;
    }
    
    /* Adjust file upload styling */
    .na-custom-form .na-form .na-fields-container label.na-file-upload input[type="file"] {
        padding: 0.5rem;
    }
    
    /* Adjust textarea styling */
    .na-custom-form .na-form .na-fields-container textarea {
        min-height: 80px;
    }
    
    /* Adjust thank you message for mobile */
    .na-custom-form .na-thanks {
        margin-top: 1.5rem;
        padding: 1rem;
        border-radius: 6px;
    }
    
    .na-custom-form .na-thanks h3 {
        font-size: 18px;
        margin-bottom: 0.75rem;
    }
    
    .na-custom-form .na-thanks p {
        line-height: 1.5;
        margin-bottom: 0.75rem;
    }
    
    .na-custom-form .na-thanks .na-help-line {
        margin-top: 0.75rem;
    }
    
    /* Adjust step navigation for mobile */
    .na-custom-form .na-step h3 {
        font-size: 18px;
        margin-bottom: 0.75rem;
    }
    
    .na-custom-form .na-step-description {
        margin-bottom: 1rem;
    }
}

/* Small Mobile Styles (320px - 480px) */
@media screen and (max-width: 480px) {
    .na-custom-form {
        padding: 0 0.25rem;
    }
    
    .na-custom-form .na-form {
        padding: 0.75rem 1rem;
    }
    
    /* Content font-size 14px for small mobile */
    .na-custom-form .na-form .na-fields-container label,
    .na-custom-form .na-form .na-fields-container input,
    .na-custom-form .na-form .na-fields-container select,
    .na-custom-form .na-form .na-fields-container textarea,
    .na-custom-form .na-error-message,
    .na-items-count,
    .na-item-content,
    .na-item-actions,
    .na-item-actions a,
    .na-custom-form .na-thanks p,
    .na-custom-form .na-thanks .na-help-line,
    .na-custom-form .na-step-description {
        font-size: 14px !important;
    }
    
    .na-custom-form .na-form .na-fields-container label {
        line-height: 20px;
        margin: 1rem 0;
    }
    
    .na-custom-form .na-form .na-fields-container div.flex-box {
        gap: 0.5rem;
    }
    
    .na-custom-form .na-actions button {
        padding: 10px 16px;
        font-size: 15px;
    }
    
    .na-items-section,
    .na-terms-section {
        padding: 0.75rem;
    }
    
    .na-items-section h4,
    .na-terms-section h4 {
        font-size: 15px;
    }
    
    .na-items-list li {
        padding: 0.5rem;
    }
    
    .na-item-actions a {
        padding: 0.2rem 0.4rem;
    }
    
    .na-custom-form .na-thanks {
        padding: 0.75rem;
    }
    
    .na-custom-form .na-thanks h3 {
        font-size: 16px;
    }
}

/* Landscape Mobile Styles */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .na-custom-form .na-form {
        padding: 1.25rem;
    }
    
    /* Content font-size 14px for landscape mobile */
    .na-custom-form .na-form .na-fields-container label,
    .na-custom-form .na-form .na-fields-container input,
    .na-custom-form .na-form .na-fields-container select,
    .na-custom-form .na-form .na-fields-container textarea,
    .na-custom-form .na-error-message,
    .na-items-count,
    .na-item-content,
    .na-item-actions,
    .na-item-actions a,
    .na-custom-form .na-thanks p,
    .na-custom-form .na-thanks .na-help-line,
    .na-custom-form .na-step-description {
        font-size: 14px !important;
    }
    
    .na-custom-form .na-form .na-fields-container div.flex-box {
        flex-direction: row;
        gap: 1rem;
    }
    
    .na-custom-form .na-form .na-fields-container div.flex-box label.flexed {
        width: 48%;
    }
    
    .na-custom-form .na-actions {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
    
    .na-custom-form .na-actions button {
        width: auto;
        min-width: 120px;
    }
}

/* High DPI Displays */
@media screen and (-webkit-min-device-pixel-ratio: 2), 
       screen and (min-resolution: 192dpi) {
    .na-custom-form .na-form {
        border-width: 0.5px;
    }
    
    .na-items-list li,
    .na-items-section,
    .na-terms-section {
        border-width: 0.5px;
    }
}

/* Print Styles */
@media print {
    .na-custom-form {
        max-width: 100%;
        margin: 0;
    }
    
    .na-custom-form .na-form {
        border: none;
        padding: 0;
    }
    
    .na-custom-form .na-actions {
        display: none;
    }
    
    .na-items-section,
    .na-terms-section {
        background: none;
        border: 1px solid #ccc;
    }
}