/**
 * Convert Reports - Frontend Styles
 */

/* Container */
.cr-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.cr-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #4CAF50;
}

/* Form Wrapper */
.cr-form-wrapper {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cr-form {
    display: block;
}

/* Form Rows */
.cr-form-row {
    margin-bottom: 20px;
}

.cr-form-row label {
    display: block;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    font-size: 14px;
}

.cr-form-row input[type="text"],
.cr-form-row input[type="date"],
.cr-form-row input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.cr-form-row input[type="text"]:focus,
.cr-form-row input[type="date"]:focus,
.cr-form-row input[type="email"]:focus {
    border-color: #4CAF50;
    outline: none;
}

.cr-form-row input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.cr-form-row input[disabled] {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Required asterisk */
.cr-required {
    color: #f44336;
    font-weight: bold;
}

/* Checkbox Row */
.cr-checkbox-row label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.cr-checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

/* Form Section */
.cr-form-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.cr-form-section h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
}

/* File Input */
.cr-form-row input[type="file"] {
    padding: 10px;
    border: 1px dashed #ddd;
    border-radius: 4px;
    background: #fafafa;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
}

.cr-form-row input[type="file"]:hover {
    border-color: #4CAF50;
    background: #f0f7f0;
}

/* Form Actions */
.cr-form-actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.cr-submit-btn {
    background-color: #4CAF50;
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cr-submit-btn:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

.cr-submit-btn:active {
    transform: translateY(0);
}

.cr-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Message */
.cr-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
}

.cr-message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4CAF50;
}

.cr-message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

/* Jobs Table Wrapper */
.cr-jobs-wrapper {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cr-jobs-wrapper h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

/* Jobs Table */
.cr-jobs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.cr-jobs-table thead {
    background-color: #f5f5f5;
}

.cr-jobs-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #444;
    border-bottom: 2px solid #ddd;
}

.cr-jobs-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #555;
}

.cr-jobs-table tbody tr:hover {
    background-color: #f9f9f9;
}

.cr-jobs-table tbody tr:last-child td {
    border-bottom: none;
}

/* No Jobs */
.cr-no-jobs {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 30px !important;
}

/* Status Indicators */
.cr-status {
    font-weight: 500;
}

.cr-status-pending,
.cr-status-processing {
    color: #ff9800;
}

.cr-status-completed {
    color: #4CAF50;
    font-weight: 600;
}

.cr-status-failed {
    color: #f44336;
    font-weight: 600;
}

/* Spinner */
.cr-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ff9800;
    border-top-color: transparent;
    border-radius: 50%;
    animation: cr-spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes cr-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Action Buttons */
.cr-actions {
    white-space: nowrap;
}

.cr-download-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #2196F3;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.cr-download-btn:hover {
    background-color: #1976D2;
}

.cr-pending-text {
    color: #ff9800;
    font-size: 13px;
}

.cr-failed-text {
    color: #f44336;
    font-size: 13px;
    font-weight: 500;
}

/* Error Message */
.cr-error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #f44336;
    text-align: center;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .cr-container {
        padding: 15px;
    }
    
    .cr-form-wrapper,
    .cr-jobs-wrapper {
        padding: 15px;
    }
    
    .cr-jobs-table {
        font-size: 13px;
    }
    
    .cr-jobs-table th,
    .cr-jobs-table td {
        padding: 10px;
    }
    
    .cr-submit-btn {
        width: 100%;
    }
}
