/*
 * Public and Admin styles for the Resume Analyzer plugin.
 */

/* --- General Form Wrapper and Elements --- */
.ra-form-wrapper {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05); /* Added subtle shadow */
}

.ra-form h2 {
    text-align: center;
    color: #0073aa;
    margin-bottom: 20px;
    font-size: 1.8em; /* Slightly larger heading */
}

.ra-form p {
    text-align: left;
    margin: 10px 0 !important;
    line-height: 1.5;
}

.ra-form-group {
    margin-bottom: 15px;
}

.ra-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555; /* Slightly darker label text */
}

.ra-form-group input[type="text"],
.ra-form-group input[type="email"],
.ra-form-group textarea,
.ra-form-group input[type="number"] { /* Added number input type */
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em; /* Consistent font size */
}

.ra-form-group input[type="file"] {
    display: block;
    margin-top: 5px;
    padding: 5px; /* Add some padding for file input */
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fff;
}

/* --- Checkbox Styling --- */
.ra-form-group label input[type="checkbox"] {
    margin-right: 8px; /* Space out checkbox from text */
    vertical-align: middle;
}
.ra-form-group label.checkbox-label { /* If you want to style the entire label for a checkbox */
    display: flex;
    align-items: center;
    font-weight: normal; /* Checkbox labels typically not bold unless main title */
}

/* --- Coupon Section --- */
.ra-coupon-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.ra-coupon-section label {
    flex-shrink: 0; /* Prevent label from shrinking */
    margin-bottom: 0; /* Align label horizontally */
}

.ra-coupon-section input[type="text"] {
    flex-grow: 1;
    min-width: 150px; /* Ensure input has a minimum width */
}

.ra-apply-coupon {
    padding: 8px 15px; /* Slightly more padding */
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.3s ease; /* Smooth transition */
}

.ra-apply-coupon:hover {
    background-color: #005a87;
}

#ra-coupon-message {
    width: 100%; /* Take full width below coupon input/button */
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
}


/* --- Pricing Summary --- */
.ra-pricing-summary {
    background-color: #e9f7fd;
    border: 1px solid #b3e0f2;
    padding: 15px;
    border-radius: 6px;
    margin-top: 25px;
    font-size: 1.1em;
}

.ra-pricing-summary p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0;
}

.ra-pricing-summary strong {
    color: #333;
    flex: 1;
}

.ra-pricing-summary .ra-price {
    white-space: nowrap;
    font-weight: bold;
}

.ra-pricing-summary .discount,
.ra-pricing-summary .ra-discounted-amount {
    color: #d9534f; /* Bootstrap red */
}

.ra-pricing-summary .total,
.ra-pricing-summary #ra-total-price {
    font-size: 1.2em;
    color: #0074a2;
}

/* --- reCAPTCHA Styling --- */
.g-recaptcha {
    margin: 20px auto;
    display: flex; /* Center reCAPTCHA */
    justify-content: center;
}

/* --- Payment Section & Submit Button --- */
.ra-payment-section {
    margin-top: 30px;
    text-align: center; /* Center PayPal buttons/submit button */
}

.ra-form button.ra-submit-button {
    display: block; /* Make it block level */
    width: 100%;
    padding: 15px;
    background-color: #0085ba;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.ra-form button.ra-submit-button:hover {
    background-color: #006799;
    transform: translateY(-1px); /* Slight lift on hover */
}

/* --- Response Messages --- */
#ra-response-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    display: none;
    font-weight: bold;
}

#ra-response-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#ra-response-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- Loading Overlay --- */
.ra-form-wrapper.loading {
    position: relative;
    opacity: 0.6; /* Dim the form */
    pointer-events: none; /* Disable interaction */
}
.ra-form-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7) url('data:image/svg+xml;charset=UTF8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" stroke="%230073aa" stroke-width="8" fill="none"><animateTransform attributeName="transform" type="rotate" from="0 50 50" to="360 50 50" dur="1s" repeatCount="indefinite"/></circle><circle cx="50" cy="50" r="20" stroke="%23005a87" stroke-width="4" fill="none"><animateTransform attributeName="transform" type="rotate" from="360 50 50" to="0 50 50" dur="0.8s" repeatCount="indefinite"/></circle></svg>') no-repeat center center;
    background-size: 50px; /* Size the spinner */
    z-index: 10;
    border-radius: 8px; /* Match wrapper border-radius */
}

/* --- Admin Log Table Specific Styles (applied by wp_enqueue_style on admin pages) --- */
.wp-list-table .ra-process-manually {
    background-color: #28a745; /* Green for process button */
    border-color: #28a745;
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wp-list-table .ra-process-manually:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.wp-list-table .button[disabled] {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Responsive table cells for file links */
.wp-list-table td div {
    word-break: break-all; /* Break long file names */
}

/* General WP Admin styles integration */
.wrap h1 {
    margin-bottom: 20px;
}
.wrap form h2 {
    margin-top: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-size: 1.5em;
    color: #333;
}

/* Ensure pagination links are styled correctly */
.tablenav .tablenav-pages {
    float: none; /* Reset float */
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}
.tablenav .tablenav-pages .pagination-links {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    color: #0073aa;
}
.tablenav .tablenav-pages .pagination-links.current {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}
.tablenav .tablenav-pages .pagination-links:hover {
    background-color: #005a87;
    color: #fff;
    border-color: #005a87;
}

/* Loading animation for form submission */
.ra-form-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Admin diagnostics for loading (if still used) */
.ra-admin-diagnostics {
    margin-top: 20px;
    font-size: 0.8em;
    color: #777;
    text-align: center;
}