/* NBS Contact Form - Frontend Styles */


/* Messages */
.nbs-form-messages {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 4px;
    display: none;
}

.nbs-form-messages.nbs-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: block;
}

.nbs-form-messages.nbs-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: block;
}

/* Form Fields */
.nbs-form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Form Rows (Layout Support) */
.nbs-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 5px;
}

.nbs-form-field {
    display: flex;
    flex-direction: column;
    flex: 1 1 100%;
    /* Default: full width */
    min-width: 0;
    /* Prevent overflow */
}

/* Column Width Classes */
.nbs-form-field.nbs-col-1-1 {
    flex: 1 1 100%;
}

.nbs-form-field.nbs-col-1-2 {
    flex: 1 1 calc(50% - 7.5px);
}

.nbs-form-field.nbs-col-1-3 {
    flex: 1 1 calc(33.333% - 10px);
}

.nbs-form-field.nbs-col-2-3 {
    flex: 1 1 calc(66.666% - 5px);
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
    .nbs-form-row {
        flex-direction: column;
    }

    .nbs-form-field.nbs-col-1-2,
    .nbs-form-field.nbs-col-1-3,
    .nbs-form-field.nbs-col-2-3 {
        flex: 1 1 100%;
    }
}

/* Pre-Label (displayed above field label) */
.nbs-field-pre-label {
    font-weight: 700;
    font-size: 15px;
    color: #333;
    margin-bottom: 6px;
}

.nbs-field-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.nbs-required-mark {
    color: #dc3545;
    margin-left: 3px;
}

/* Input Styles */
.nbs-input {
    padding: 8px 15px !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.nbs-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.nbs-input.nbs-error-field {
    border-color: #dc3545;
}

.nbs-textarea {
    resize: vertical;
    min-height: 120px;
    padding: 12px 15px;
}

.nbs-input-file {
    padding: 8px;
    cursor: pointer;
    border: 2px dashed #ddd;
    background: #fafafa;
}

.nbs-input-file:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.nbs-input-file:focus {
    border-style: solid;
}

.nbs-file-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.nbs-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Radio and Checkbox Groups */
.nbs-radio-group,
.nbs-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nbs-radio-label,
.nbs-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.nbs-radio-label input,
.nbs-checkbox-label input {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Honeypot (spam protection) */
.nbs-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

/* Submit Button */
.nbs-form-submit {
    margin-top: 10px;
}

.nbs-submit-button {
    background: #0073aa;
    color: #fff;
    padding: 14px 32px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.nbs-submit-button:hover {
    background: #005a87;
}

.nbs-submit-button:active {
    transform: scale(0.98);
}

.nbs-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Loading Spinner */
.nbs-spinner {
    animation: rotate 2s linear infinite;
    width: 20px;
    height: 20px;
}

.nbs-spinner .path {
    stroke: #fff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nbs-contact-form-wrapper {
        padding: 10px;
    }

    .nbs-contact-form {
        padding: 20px;
    }
}