/* Prop Firm Dispute Handler - Frontend Styles */

/* General */
.pfdh-submit-form-wrapper,
.pfdh-user-dashboard,
.pfdh-firms-table-wrapper,
.pfdh-audit-page,
.pfdh-all-audits {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Form Styles */
.pfdh-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pfdh-form-group {
    margin-bottom: 20px;
}

.pfdh-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.pfdh-form-group input[type="text"],
.pfdh-form-group input[type="email"],
.pfdh-form-group input[type="number"],
.pfdh-form-group input[type="date"],
.pfdh-form-group select,
.pfdh-form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.pfdh-form-group input:focus,
.pfdh-form-group select:focus,
.pfdh-form-group textarea:focus {
    outline: none;
    border-color: #2271b1;
}

.pfdh-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .pfdh-form-row {
        grid-template-columns: 1fr;
    }
}

.pfdh-submit-btn {
    background: #2271b1;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.pfdh-submit-btn:hover {
    background: #135e96;
}

.pfdh-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pfdh-form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
}

.pfdh-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.pfdh-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Firms Table */
.pfdh-table-description {
    color: #666;
    margin-bottom: 20px;
}

.pfdh-firms-table {
    width: 100%;
    background: #fff;
    border-collapse: collapse;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.pfdh-firms-table thead {
    background: #2271b1;
    color: white;
}

.pfdh-firms-table th,
.pfdh-firms-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.pfdh-firms-table tbody tr:hover {
    background: #f9f9f9;
}

.pfdh-firm-name {
    font-size: 16px;
}

/* Health Bar */
.pfdh-health-bar {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.pfdh-health-bar.pfdh-health-good {
    background: #d4edda;
    color: #155724;
}

.pfdh-health-bar.pfdh-health-average {
    background: #fff3cd;
    color: #856404;
}

.pfdh-health-bar.pfdh-health-bad {
    background: #f8d7da;
    color: #721c24;
}

.pfdh-health-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
}

.pfdh-health-good .pfdh-health-indicator {
    background: #28a745;
}

.pfdh-health-average .pfdh-health-indicator {
    background: #ffc107;
}

.pfdh-health-bad .pfdh-health-indicator {
    background: #dc3545;
}

/* Percentage */
.pfdh-percentage.pfdh-high {
    color: #dc3545;
    font-weight: 600;
}

/* View Audit Link */
.pfdh-view-audit {
    background: #0073aa;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    display: inline-block;
    transition: background 0.3s;
}

.pfdh-view-audit:hover {
    background: #005177;
    color: white;
}

/* Audit Page */
.pfdh-audit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.pfdh-health-status-large {
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
}

.pfdh-health-status-large.pfdh-health-good {
    background: #28a745;
    color: white;
}

.pfdh-health-status-large.pfdh-health-average {
    background: #ffc107;
    color: #333;
}

.pfdh-health-status-large.pfdh-health-bad {
    background: #dc3545;
    color: white;
}

.pfdh-audit-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.pfdh-stat-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.pfdh-stat-box h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
}

.pfdh-stat-value {
    margin: 0;
    font-size: 32px;
    font-weight: bold;
    color: #2271b1;
}

.pfdh-audit-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Disputes Section */
.pfdh-disputes-section {
    margin-top: 40px;
}

.pfdh-disputes-list {
    display: grid;
    gap: 20px;
}

.pfdh-dispute-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #2271b1;
}

.pfdh-dispute-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.pfdh-dispute-header h3 {
    margin: 0;
    font-size: 18px;
}

.pfdh-case-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.pfdh-case-status.pfdh-status-resolved {
    background: #d4edda;
    color: #155724;
}

.pfdh-case-status.pfdh-status-unresolved {
    background: #f8d7da;
    color: #721c24;
}

.pfdh-case-status.pfdh-status-case-pending {
    background: #fff3cd;
    color: #856404;
}

.pfdh-case-status.pfdh-status-no-reply {
    background: #e2e3e5;
    color: #383d41;
}

.pfdh-case-status.pfdh-status-n-a {
    background: #d1ecf1;
    color: #0c5460;
}

.pfdh-dispute-date {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
}

.pfdh-dispute-excerpt {
    color: #333;
    line-height: 1.6;
}

/* All Audits Page */
.pfdh-audit-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.pfdh-audit-link-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.pfdh-audit-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.pfdh-audit-link-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.pfdh-audit-link-header h3 {
    margin: 0;
    font-size: 18px;
}

.pfdh-audit-link-header h3 a {
    color: #2271b1;
    text-decoration: none;
}

.pfdh-audit-link-header h3 a:hover {
    text-decoration: underline;
}

.pfdh-health-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.pfdh-health-badge.pfdh-health-good {
    background: #28a745;
    color: white;
}

.pfdh-health-badge.pfdh-health-average {
    background: #ffc107;
    color: #333;
}

.pfdh-health-badge.pfdh-health-bad {
    background: #dc3545;
    color: white;
}

.pfdh-status-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.pfdh-status-tag {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.pfdh-status-tag.pfdh-tag-resolved {
    background: #d4edda;
    color: #155724;
}

.pfdh-status-tag.pfdh-tag-unresolved {
    background: #f8d7da;
    color: #721c24;
}

.pfdh-status-tag.pfdh-tag-case-pending {
    background: #fff3cd;
    color: #856404;
}

.pfdh-status-tag.pfdh-tag-no-reply {
    background: #e2e3e5;
    color: #383d41;
}

.pfdh-status-tag.pfdh-tag-n-a {
    background: #d1ecf1;
    color: #0c5460;
}

.pfdh-audit-quick-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

/* User Dashboard */
.pfdh-disputes-table {
    width: 100%;
    background: #fff;
    border-collapse: collapse;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.pfdh-disputes-table thead {
    background: #2271b1;
    color: white;
}

.pfdh-disputes-table th,
.pfdh-disputes-table td {
    padding: 12px 15px;
    text-align: left;
}

.pfdh-disputes-table tbody tr {
    border-bottom: 1px solid #eee;
}

.pfdh-disputes-table tbody tr:hover {
    background: #f9f9f9;
}

.pfdh-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.pfdh-status.pfdh-status-resolved {
    background: #d4edda;
    color: #155724;
}

.pfdh-status.pfdh-status-unresolved {
    background: #f8d7da;
    color: #721c24;
}

.pfdh-status.pfdh-status-case-pending {
    background: #fff3cd;
    color: #856404;
}

/* Firm Dropdown Styles */
.pfdh-firm-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: #fff;
    cursor: pointer;
}

#firm_name_new {
    margin-top: 10px;
    border: 2px solid #4CAF50 !important;
}

.pfdh-form-group .description {
    margin-top: 5px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Approval Status Styles */
.pfdh-approval-approved {
    color: #4CAF50;
    font-weight: bold;
}

.pfdh-approval-pending {
    color: #ff9800;
    font-weight: bold;
}

/* Back Link */
.pfdh-back-link {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.pfdh-back-link a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.pfdh-back-link a:hover {
    color: #45a049;
}
