/**
 * Frontend CSS for HWCP
 */

/* Form Styles */
.hwcp-form {
    max-width: 600px;
    margin: 20px 0;
}

.hwcp-form-fields {
    margin-bottom: 20px;
}

.hwcp-form-group {
    margin-bottom: 20px;
}

.hwcp-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.hwcp-required {
    color: #e74c3c;
}

.hwcp-input,
.hwcp-textarea,
.hwcp-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.hwcp-input:focus,
.hwcp-textarea:focus,
.hwcp-select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.hwcp-textarea {
    resize: vertical;
    min-height: 100px;
}

.hwcp-checkbox {
    width: auto;
    margin-right: 8px;
}

.hwcp-checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.hwcp-multiselect {
    height: auto;
    min-height: 100px;
}

.hwcp-help-text {
    font-size: 13px;
    color: #666;
    margin: 5px 0 0;
}

.hwcp-field-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
}

.hwcp-form-messages {
    margin-bottom: 20px;
}

.hwcp-success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.hwcp-error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.hwcp-form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hwcp-submit-btn {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.hwcp-submit-btn:hover {
    background: #135e96;
}

.hwcp-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.hwcp-loading {
    color: #666;
    font-size: 14px;
}

/* List/Table Styles */
.hwcp-list {
    margin: 20px 0;
}

.hwcp-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hwcp-table thead {
    background: #f8f9fa;
}

.hwcp-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.hwcp-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
}

.hwcp-table tbody tr:hover {
    background: #f8f9fa;
}

.hwcp-no-entries {
    text-align: center;
    padding: 40px;
    color: #666;
    background: #f8f9fa;
    border-radius: 4px;
}

/* Pagination */
.hwcp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.hwcp-page-link {
    background: #2271b1;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
}

.hwcp-page-link:hover {
    background: #135e96;
}

.hwcp-page-info {
    color: #666;
    font-size: 14px;
}

/* Single Entry Display */
.hwcp-single {
    margin: 20px 0;
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hwcp-entry-details {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 15px;
    margin: 0;
}

.hwcp-field-label {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.hwcp-field-value {
    color: #666;
    margin: 0;
}

/* Error Message */
.hwcp-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .hwcp-form {
        max-width: 100%;
    }
    
    .hwcp-table {
        font-size: 14px;
    }
    
    .hwcp-table th,
    .hwcp-table td {
        padding: 8px 10px;
    }
    
    .hwcp-entry-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .hwcp-field-label {
        padding-bottom: 5px;
        border-bottom: 1px solid #dee2e6;
    }
}
