/* Form Container */
.filemaker-form-container {
    margin: 20px 0;
    max-width: 800px;
}

/* Form Fields */
.filemaker-form-field {
    margin-bottom: 20px;
}

.filemaker-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.filemaker-form-field input[type="text"],
.filemaker-form-field input[type="email"],
.filemaker-form-field input[type="number"],
.filemaker-form-field input[type="date"],
.filemaker-form-field textarea,
.filemaker-form-field select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filemaker-form-field textarea {
    min-height: 100px;
}

.filemaker-form-field.field-error input,
.filemaker-form-field.field-error textarea,
.filemaker-form-field.field-error select {
    border-color: #dc3232;
}

.filemaker-field-error {
    color: #dc3232;
    font-size: 0.9em;
    margin-top: 5px;
    display: none;
}

/* Radio and Checkbox Groups */
.filemaker-radio-group,
.filemaker-checkbox-group {
    margin-top: 5px;
}

.filemaker-radio-option,
.filemaker-checkbox-option {
    margin-bottom: 5px;
}

.filemaker-radio-option label,
.filemaker-checkbox-option label {
    display: inline;
    margin-left: 5px;
    font-weight: normal;
}

/* Form Messages */
.filemaker-form-success,
.filemaker-form-error {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

.filemaker-form-success {
    background-color: #ecf8e0;
    color: #2c662d;
    border: 1px solid #c5e1a5;
}

.filemaker-form-error {
    background-color: #fde8e8;
    color: #a83232;
    border: 1px solid #f5c6cb;
}

/* Multi-page Form */
.filemaker-form-progress {
    margin-bottom: 20px;
}

/* Standard Navigation (for few pages) */
.filemaker-form-progress-steps {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid #ddd;
    flex-wrap: wrap;
}

.filemaker-form-progress-steps li {
    position: relative;
    opacity: 0.6;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.filemaker-form-progress-steps li.active {
    font-weight: bold;
    border-bottom: 2px solid #0073aa;
    opacity: 1;
}

.filemaker-form-progress-steps .page-link {
    display: block;
    padding: 10px 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: inherit;
    font-family: inherit;
    text-align: left;
    width: 100%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.filemaker-form-progress-steps .page-link:hover {
    background-color: #f5f5f5;
    color: #0073aa;
}

.filemaker-form-progress-steps li.active .page-link {
    color: #0073aa;
    font-weight: bold;
}

/* Dropdown Navigation (for many pages) */
.filemaker-form-progress-dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 400px;
}

.filemaker-form-progress-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.filemaker-form-progress-toggle:hover {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px rgba(0, 115, 170, 0.1);
}

.filemaker-form-progress-toggle.open {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px rgba(0, 115, 170, 0.1);
}

.filemaker-form-progress-toggle .current-page-name {
    font-weight: bold;
    color: #0073aa;
}

.filemaker-form-progress-toggle .page-counter {
    color: #666;
    font-size: 13px;
    margin-left: 8px;
}

.filemaker-form-progress-toggle .dropdown-arrow {
    font-size: 12px;
    color: #666;
    transition: transform 0.2s ease;
}

.filemaker-form-progress-toggle.open .dropdown-arrow {
    transform: rotate(180deg);
}

.filemaker-form-progress-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    margin: 2px 0 0 0;
    padding: 0;
    list-style: none;
}

.filemaker-form-progress-dropdown-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.filemaker-form-progress-dropdown-menu li:last-child {
    border-bottom: none;
}

.filemaker-form-progress-dropdown-menu li.active {
    background-color: #f8f9fa;
}

.filemaker-form-progress-dropdown-menu .page-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: inherit;
    font-family: inherit;
    text-align: left;
    transition: background-color 0.2s ease;
}

.filemaker-form-progress-dropdown-menu .page-link:hover {
    background-color: #f5f5f5;
}

.filemaker-form-progress-dropdown-menu li.active .page-link {
    background-color: #e8f4f8;
    color: #0073aa;
}

.filemaker-form-progress-dropdown-menu .page-number {
    font-weight: bold;
    color: #666;
    margin-right: 8px;
    min-width: 24px;
}

.filemaker-form-progress-dropdown-menu li.active .page-number {
    color: #0073aa;
}

.filemaker-form-progress-dropdown-menu .page-name {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filemaker-form-progress-steps {
        flex-direction: column;
        border-bottom: none;
        border: 1px solid #ddd;
        border-radius: 4px;
    }
    
    .filemaker-form-progress-steps li {
        border-bottom: 1px solid #f0f0f0;
        border-right: none;
    }
    
    .filemaker-form-progress-steps li:last-child {
        border-bottom: none;
    }
    
    .filemaker-form-progress-steps li.active {
        border-bottom: 1px solid #f0f0f0;
        border-left: 3px solid #0073aa;
    }
    
    .filemaker-form-progress-dropdown {
        max-width: 100%;
    }
}

/* Enhanced Navigation Styles */
.filemaker-form-progress-steps li:not(.active) .page-link {
    color: #666;
}

.filemaker-form-progress-steps li:not(.active):hover .page-link {
    color: #0073aa;
}

/* Visual feedback for completed pages */
.filemaker-form-progress-steps li.completed {
    opacity: 0.8;
}

.filemaker-form-progress-steps li.completed .page-link::after {
    content: " ✓";
    color: #46b450;
    font-weight: bold;
}

.filemaker-form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.filemaker-form-prev,
.filemaker-form-next {
    padding: 8px 16px;
    background-color: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.filemaker-form-submit {
    margin-top: 20px;
}

.filemaker-form-submit button {
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.filemaker-form-submit button:hover {
    background-color: #005177;
}

/* Inline fields - extremely aggressive styling to override theme styles */
.filemaker-field-inline {
    display: inline-block !important;
    vertical-align: top !important;
    width: 48% !important;
    margin-right: 2% !important;
    box-sizing: border-box !important;
    float: left !important;
    clear: none !important;
}

.filemaker-field-inline:nth-of-type(2n) {
    margin-right: 0 !important;
    float: right !important;
}

.filemaker-field-inline:nth-of-type(2n+1) {
    clear: left !important;
}

.filemaker-form-field:not(.filemaker-field-inline) {
    clear: both !important;
    width: 100% !important;
    float: none !important;
}

/* Force full width for inputs */
.filemaker-field-inline input,
.filemaker-field-inline select,
.filemaker-field-inline textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Clear floats */
.filemaker-form-page:after,
.filemaker-form:after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}

/* Add a visible indicator for debugging */
.filemaker-field-inline {
    position: relative !important;
}

.filemaker-field-inline:before {
    content: none !important;
    display: none !important;
}

@media (max-width: 768px) {
    .filemaker-field-inline {
        display: block !important;
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
    }
}

/* Info Field Styles */
.filemaker-form-info {
    margin: 15px 0;
}

.filemaker-form-heading h1,
.filemaker-form-heading h2,
.filemaker-form-heading h3,
.filemaker-form-heading h4,
.filemaker-form-heading h5,
.filemaker-form-heading h6 {
    margin: 0 0 10px 0;
    padding: 0;
    line-height: 1.2;
}

.filemaker-form-text {
    margin-bottom: 15px;
}

.filemaker-form-divider {
    margin: 20px 0;
}

.filemaker-form-divider hr {
    border: 0;
    height: 1px;
    margin: 0;
}

/* Save Progress */
.filemaker-save-progress {
    margin-right: 10px;
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

.filemaker-restore-notice {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.filemaker-restore-link {
    color: #0073aa;
    text-decoration: underline;
    cursor: pointer;
}

.filemaker-restore-link:hover {
    color: #00a0d2;
}

.filemaker-save-message,
.filemaker-restore-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
}

/* File Upload */
.filemaker-file-upload {
    margin-top: 5px;
}

.filemaker-file-preview {
    margin-top: 10px;
    max-width: 200px;
}

.filemaker-file-preview img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    padding: 3px;
}

.filemaker-remove-file {
    display: block;
    margin-top: 5px;
    background: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
}

.filemaker-file-progress {
    margin-top: 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.filemaker-file-progress-bar {
    height: 20px;
    background-color: #4CAF50;
    width: 0%;
    transition: width 0.3s;
}

.filemaker-file-progress-text {
    margin-top: 5px;
    font-size: 12px;
    text-align: center;
} 