/* FileMaker Data Workflow Styles */

/* Container Styles */
.filemaker-data-container {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    position: relative;
}

/* Search Container */
.filemaker-search-container {
    margin-bottom: 20px;
    position: relative;
}

.filemaker-search-box {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.filemaker-search-box:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.2);
}

.filemaker-search-info {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

/* Table Styles */
.filemaker-data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filemaker-data-table th {
    background: #f5f5f5;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.filemaker-data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    color: #444;
}

.filemaker-data-table tr:hover {
    background-color: #f9f9f9;
}

/* List Styles */
.filemaker-data-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filemaker-data-item {
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filemaker-data-item:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.filemaker-data-field {
    margin-bottom: 8px;
}

.filemaker-data-field:last-child {
    margin-bottom: 0;
}

.filemaker-data-label {
    font-weight: 600;
    color: #333;
    margin-right: 8px;
}

.filemaker-data-value {
    color: #444;
}

/* Clickable Elements */
.filemaker-clickable-data .filemaker-data-row:hover,
.filemaker-clickable-data .filemaker-data-item:hover {
    background-color: #f0f7ff;
    cursor: pointer;
}

/* Load More Button */
.filemaker-load-more-container {
    text-align: center;
    margin-top: 20px;
}

.filemaker-load-more-btn {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.filemaker-load-more-btn:hover {
    background: #005177;
}

.filemaker-load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.filemaker-loading {
    color: #666;
    font-style: italic;
}

/* Modal Styles */
.filemaker-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    overflow-y: auto;
    padding: 20px;
}

.filemaker-form-modal,
.filemaker-view-modal {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: auto;
}

.filemaker-form-modal-header,
.filemaker-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filemaker-form-modal-header h3,
.filemaker-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.filemaker-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.filemaker-modal-close:hover {
    color: #333;
}

.filemaker-form-modal-body,
.filemaker-modal-body {
    padding: 20px;
}

/* View Modal Specific Styles */
.filemaker-view-content {
    margin-bottom: 20px;
}

.filemaker-view-field {
    margin-bottom: 15px;
}

.filemaker-view-field label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.filemaker-view-value {
    padding: 8px 12px;
    background: #f9f9f9;
    border-radius: 4px;
    color: #444;
}

.filemaker-modal-actions {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    text-align: right;
}

.filemaker-btn-print,
.filemaker-btn-close {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
}

.filemaker-btn-print {
    background: #0073aa;
    color: #fff;
}

.filemaker-btn-close {
    background: #f5f5f5;
    color: #333;
}

.filemaker-btn-print:hover {
    background: #005177;
}

.filemaker-btn-close:hover {
    background: #e5e5e5;
}

/* Search Highlight */
.filemaker-highlight {
    background-color: #fff3cd;
    padding: 2px;
    border-radius: 2px;
}

/* Error Messages */
.filemaker-data-error {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Loading States */
.filemaker-form-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    border-radius: 4px;
    margin: 20px 0;
}

.filemaker-form-loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: filemaker-spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
    .filemaker-data-table {
        display: block;
        overflow-x: auto;
    }
    
    .filemaker-modal-overlay {
        padding: 10px;
    }
    
    .filemaker-form-modal,
    .filemaker-view-modal {
        width: 95%;
        max-height: calc(100vh - 20px);
        margin: 10px auto;
    }
    
    .filemaker-data-item {
        padding: 10px;
    }
    
    .filemaker-modal-actions {
        text-align: center;
    }
    
    .filemaker-btn-print,
    .filemaker-btn-close {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
} 