/**
 * Custom Fields CSS
 * 
 * Styles for the custom fields configuration in OWH Domain WHOIS RDAP
 *
 * @since      1.0.0
 * @package    Owh_Domain_Whois_Rdap
 * @subpackage Owh_Domain_Whois_Rdap/admin/css
 */

/* Custom Fields Container */
#custom-fields-container {
    background: #fff;
    padding: 20px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    margin-top: 20px;
}

#custom-fields-grid-wrapper {
    margin-bottom: 20px;
    min-height: 200px;
}

/* Grid Styles */
.owh-custom-fields-table {
    width: 100% !important;
}

.owh-custom-fields-table input[type="text"] {
    width: 100% !important;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
}

/* Error Message Field Styling */
.field-error-message {
    font-style: italic;
}

.field-error-message::placeholder {
    font-style: italic;
    color: #888;
}

/* Welcome message for empty state */
.no-fields-message {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 8px;
    margin: 20px 0;
}

.no-fields-message h3 {
    color: #555;
    margin-bottom: 15px;
    font-size: 18px;
}

.no-fields-message p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.no-fields-message p.description {
    font-size: 13px;
    font-style: italic;
    color: #888;
}

.owh-custom-fields-table input[type="text"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.owh-custom-fields-table .field-label {
    background-color: #f9f9f9;
}

.owh-custom-fields-table .field-regex {
    font-family: 'Courier New', Courier, monospace;
    background-color: #fafafa;
}

/* Action buttons in grid */
.custom-field-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.custom-field-actions .button {
    font-size: 11px;
    padding: 2px 8px;
    height: auto;
    line-height: 1.4;
}

.test-regex-btn {
    background: #0073aa !important;
    color: white !important;
    border-color: #0073aa !important;
}

.test-regex-btn:hover {
    background: #005a87 !important;
    border-color: #005a87 !important;
}

.remove-field-btn {
    color: #a00 !important;
}

.remove-field-btn:hover {
    color: #dc3232 !important;
}

/* Action buttons section */
.custom-fields-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid #e5e5e5;
    margin-top: 15px;
}

.custom-fields-actions .button {
    min-width: 120px;
}

/* Status messages */
.save-status {
    margin-left: 10px;
    padding: 8px 12px;
    border-radius: 3px;
    display: none;
}

.save-status.notice-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.save-status.notice-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.save-status.notice-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Help section */
.custom-fields-help {
    background: #f8f9fa;
    padding: 20px;
    border: 1px solid #e1e4e7;
    border-radius: 4px;
    margin-top: 25px;
}

.custom-fields-help h3 {
    margin-top: 0;
    color: #23282d;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.custom-fields-help ol {
    margin-left: 20px;
}

.custom-fields-help ol li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.regex-examples {
    background: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-top: 15px;
}

.regex-examples h4 {
    margin-top: 0;
    color: #555;
}

.regex-examples ul {
    margin-left: 20px;
}

.regex-examples li {
    margin-bottom: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.4;
}

.regex-examples code {
    background: #f1f1f1;
    padding: 2px 6px;
    border-radius: 3px;
    color: #d63384;
    font-size: 11px;
}

/* Grid search styling */
.gridjs-search {
    margin-bottom: 15px;
}

.gridjs-search input {
    width: 300px !important;
    padding: 8px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 3px !important;
    font-size: 14px !important;
}

.gridjs-search input:focus {
    border-color: #0073aa !important;
    box-shadow: 0 0 0 1px #0073aa !important;
    outline: none !important;
}

/* Grid pagination */
.gridjs-pagination {
    margin-top: 15px !important;
    justify-content: center !important;
}

.gridjs-pagination button {
    margin: 0 2px !important;
    padding: 6px 12px !important;
    border: 1px solid #ddd !important;
    background: white !important;
    color: #555 !important;
    border-radius: 3px !important;
    font-size: 13px !important;
}

.gridjs-pagination button:hover {
    background: #f8f9fa !important;
    border-color: #0073aa !important;
}

.gridjs-pagination button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

.gridjs-pagination button[aria-current="page"] {
    background: #0073aa !important;
    color: white !important;
    border-color: #0073aa !important;
}

/* Grid header styling */
.gridjs-th {
    background: #f8f9fa !important;
    color: #23282d !important;
    font-weight: 600 !important;
    padding: 12px 8px !important;
    border-bottom: 2px solid #0073aa !important;
}

.gridjs-td {
    padding: 8px !important;
    border-bottom: 1px solid #e5e5e5 !important;
}

/* Empty state */
.gridjs-container .gridjs-table {
    border: 1px solid #ddd;
    border-radius: 3px;
}

.gridjs-container .gridjs-table thead {
    background: #f8f9fa;
}

/* Responsive design */
@media (max-width: 782px) {
    .custom-fields-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .custom-fields-actions .button {
        margin-bottom: 10px;
    }
    
    .custom-field-actions {
        flex-direction: column;
    }
    
    .gridjs-search input {
        width: 100% !important;
    }
    
    /* Better mobile display for the table */
    .owh-custom-fields-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Responsive Design Improvements for Error Message Column */
@media screen and (max-width: 1200px) {
    .owh-custom-fields-table {
        font-size: 12px;
    }
    
    .owh-custom-fields-table input[type="text"] {
        padding: 4px 8px;
        font-size: 12px;
    }
}
