/**
 * Forms Gateway - Form Page Styles
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

/* Container Styles */
.loading,
.error,
.success,
#form-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Hidden State */
.hidden {
    display: none !important;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading p {
    font-size: 16px;
    color: #666;
}

/* Error State */
.error {
    text-align: center;
    padding: 60px 40px;
}

.error h2 {
    color: #dc3545;
    margin-bottom: 15px;
    font-size: 24px;
}

.error p {
    color: #666;
    margin-bottom: 10px;
}

.error-details {
    font-family: monospace;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    text-align: left;
    margin-top: 20px;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

/* Success State */
.success {
    text-align: center;
    padding: 60px 40px;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #28a745;
    color: white;
    font-size: 48px;
    line-height: 80px;
    border-radius: 50%;
}

.success h2 {
    color: #28a745;
    margin-bottom: 15px;
    font-size: 24px;
}

.success p {
    color: #666;
    margin-bottom: 10px;
}

.submission-id {
    font-family: monospace;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
    border-left: 4px solid #28a745;
}

.submission-id span {
    font-weight: bold;
    color: #155724;
}

/* Form Container */
#form-container {
    padding: 40px;
}


/* Form Renderer */
ntst-form-renderer {
    display: block;
    margin: 30px 0;
}

/* Form Actions */
.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
    text-align: right;
}

/* Button Styles */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 12px 24px;
    font-size: 16px;
    line-height: 1.5;
    border-radius: 4px;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover:not(:disabled) {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .loading,
    .error,
    .success,
    #form-container {
        padding: 20px;
        border-radius: 4px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .form-actions {
        text-align: center;
    }

    .btn {
        width: 100%;
    }
}
