/* ACF Popup Styles */
.acf-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comments-area .reply {
    margin: 0 !important;
}
.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
}

.popup-content {
    background: #1a1a1a;
    border-radius: 8px;
    max-width: 600px;
    max-height: 90vh;
    width: 90%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    color: #f0f0f0;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #333;
    background: #2a2a2a;
}

.popup-header h3 {
    margin: 0;
    color: #f0f0f0;
}

.close-popup {
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.close-popup:hover {
    color: #000;
}

.popup-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.add-listing-btn {
    background: #29bc1e;
    color: white;
    border: 1px solid #29bc1e;
    padding: 5px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    border-radius: 30px;
}

.add-listing-btn:hover {
    background: #29bc1e;
}

.login-btn:hover {
    background: #005a87 !important;
}

.register-btn:hover {
    background: #218838 !important;
}

.acf-form .acf-field {
    margin-bottom: 15px;
}

.acf-form .acf-label {
    font-weight: bold;
    margin-bottom: 5px;
}

.acf-form input[type="text"], 
.acf-form textarea, 
.acf-form select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.acf-button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.acf-button:hover {
    background: #005a87;
}

.success-message {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .search-header {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .popup-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .popup-body {
        padding: 15px;
    }
}

/* User Dashboard */
#user-dashboard-container {
    margin: 20px 0;
}

.dashboard-tabs {
    display: flex;
    border-bottom: 1px solid #dee2e6;
}

.dashboard-tabs .tab-link {
    padding: 10px 15px;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
    font-size: 16px;
    color: #495057;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.dashboard-tabs .tab-link:hover {
    background-color: #f8f9fa;
}

.dashboard-tabs .tab-link.active {
    font-weight: bold;
    color: #007bff;
    border-bottom-color: #007bff;
}

#dashboard-content {
    padding: 25px 0;
}

/* Summary Section */
.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-stat, .summary-chart {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #333;
    color: #f0f0f0;
}

.summary-stat h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #b0b0b0;
    font-weight: 500;
}

.summary-stat p {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #f0f0f0;
}

.summary-stat .star-rating {
    margin-top: 5px;
}

.summary-chart {
    grid-column: 1 / -1;
}
@media (min-width: 768px) {
    .summary-chart {
        grid-column: span 2;
    }
}


.rating-bars {
    list-style: none;
    padding: 0;
    margin: 0;
}
.rating-bars li {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    color: #6c757d;
}
.rating-bars .star-label {
    flex-shrink: 0;
    width: 20px;
}
.rating-bars .bar-container {
    flex-grow: 1;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin: 0 10px;
    overflow: hidden;
}
.rating-bars .bar {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #85c1e9, #3498db);
    border-radius: 4px;
}
.rating-bars .count-label {
    flex-shrink: 0;
    width: 40px;
    text-align: right;
    font-size: 14px;
    font-weight: 500;
}

/* Review List & Cards */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-card {
    display: flex;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    gap: 20px;
    color: #f0f0f0;
}

.review-author {
    flex: 0 0 220px;
    display: flex;
    gap: 15px;
    padding-right: 20px;
    border-right: 1px solid #f1f1f1;
}
.author-avatar img, .author-avatar .author-avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}
.author-avatar-placeholder {
    background-color: #e9ecef;
}
.author-details {
    flex-grow: 1;
}
.author-name {
    font-weight: 600;
    margin-bottom: 5px;
}
.author-meta {
    font-size: 13px;
    color: #6c757d;
}
.author-meta a {
    color: #007bff;
    text-decoration: none;
}
.author-meta a:hover {
    text-decoration: underline;
}

.review-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: #6c757d;
    font-size: 13px;
}

.star-rating {
    display: flex;
}

.star-rating .star {
    color: #e9ecef;
    font-size: 18px;
}
.star-rating .star.filled {
    color: #ffc107;
}

.review-body {
    flex-grow: 1;
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 15px;
}
.review-body p {
    margin-top: 0;
}
.review-body blockquote {
    border-left: 0;
    padding: 0;
    margin: 0;
    color: inherit;
}

.review-actions {
    margin-top: auto;
}
.action-button {
    background-color: #f8f9fa;
    color: #343a40;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #dee2e6;
    transition: background-color 0.2s;
}
.action-button:hover {
    background-color: #e9ecef;
    color: #343a40;
    text-decoration: none;
}
.dashboard-no-results {
    background: #1a1a1a;
    padding: 40px;
    text-align: center;
    border: 1px solid #333;
    border-radius: 8px;
    color: #b0b0b0;
}

.wp_review_comment {
    margin-bottom: 10px !important;
}
.single-forex-broker #respond {
    margin-bottom: 20px !important;
}

#comments.comments-area ol {
    padding: 10px !important;
}
@media (max-width: 768px) {
    .review-card {
        flex-direction: column;
    }
    .review-author {
        flex-basis: auto;
        border-right: 0;
        border-bottom: 1px solid #f1f1f1;
        padding-right: 0;
        padding-bottom: 15px;
    }
    .summary-chart {
        grid-column: span 1;
    }
}

@media (max-width: 600px) {
    .dashboard-tabs {
        flex-direction: column;
    }
    .dashboard-tabs .tab-link.active {
        border-bottom: 2px solid #0073aa;
        border-top: none;
    }
}

.comment-actions a.comment-delete-link:hover {
    background-color: #dc3545;
    color: #fff !important;
}

.comment-meta + .reply,
.comment-meta + p > a,
.comment-form-comment + .form-submit,
.comment-awaiting-moderation + .comment-meta + .reply {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}


/* Custom override for comment form submit button */
#commentform input[type="submit"] {
    background: #e6e6e6;
}

#commentform input[type="submit"]:hover {
    color: #fff;
    background-color: rgb(22 163 74 / var(--tw-bg-opacity, 1));
}

/* Reply Edit Form Styles */
.reply-edit-form textarea {
    font-family: inherit;
    resize: vertical;
}

/* Replied Status Button */
button.tw-cursor-default {
    cursor: default !important;
}

button.tw-cursor-default:hover {
    opacity: 1;
}

/* Reply Action Buttons */
.edit-reply-btn,
.delete-reply-btn {
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-reply-btn:hover {
    text-decoration: underline;
}

.delete-reply-btn:hover {
    text-decoration: underline;
}

.account-type-radio-group {
    margin-bottom: 20px;
}
.account-type-radio-group p {
    margin-bottom: 10px;
    font-weight: bold;
}
.account-type-radio-group label {
    display: inline-block;
    margin-right: 15px;
    cursor: pointer;
}
.account-type-radio-group input[type="radio"] {
    margin-right: 5px;
}

.account-type-radio-group input[type="radio"] {
    vertical-align: middle;
}

.thefxbook-logged-in-message {
    margin: 0;
    color: #f0f0f0;
}

.thefxbook-logged-in-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 1px solid #1d8315;
    border-radius: 5px;
    background: linear-gradient(180deg, rgba(29, 131, 21, 0.05) 0%, rgba(29, 131, 21, 0.10) 100%), #0c1115;
    color: #f0f0f0;
}

.thefxbook-logout-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #1d8315;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease-in-out;
}

.thefxbook-logout-button:hover {
    background-color: #16a34a;
}

a.resend-verification-link {
    color: #4ade80 !important;
}

.thefxbook-star-rating, [data-attr-id="thefxbook_star_rating"] {
	color: var(--tcb-skin-color-0);
}


/* Mobile Styles for Broker List */
@media (max-width: 768px) {
	#broker-list {
		gap: 12px;
	}

	.fxbrokers-item {
		padding: 12px;
		border: 1px solid rgba(255, 255, 255, 0.1);
		overflow: hidden;
		box-sizing: border-box;
	}

	.broker-main-info {
		flex: 1 1 auto !important;
		min-width: 0;
		align-items: flex-start !important;
		overflow: hidden;
		max-width: 100%;
	}

	.fxbrokers-cont {
		flex-direction: column !important;
		flex-wrap: nowrap !important;
		gap: 12px !important;
		align-items: stretch !important;
		justify-content: flex-start !important;
		width: 100% !important;
		overflow: hidden;
		box-sizing: border-box;
	}

	.fxbrokers-tab {
		flex-direction: row !important;
		flex-wrap: wrap !important;
		width: 100% !important;
		max-width: 100% !important;
		gap: 10px !important;
		justify-content: flex-start !important;
		align-items: flex-start !important;
		overflow: hidden;
		box-sizing: border-box;
	}

	.fxbrokers-tab li {
		flex: 0 1 auto;
		min-width: 0;
		max-width: 100%;
		padding-bottom: 0;
		border-bottom: none;
		overflow: hidden;
		box-sizing: border-box;
	}

	.fxbrokers-tab li:last-child {
		border-bottom: none;
		padding-bottom: 0;
	}

	.fxbrokers-tab li img {
		max-width: 60px;
		height: auto;
		display: block;
		margin: 0;
	}

	.fxbrokers-tab li label {
		font-size: 14px;
		margin-bottom: 4px;
		font-weight: 600;
		color: rgba(255, 255, 255, 0.95);
		white-space: normal;
		word-wrap: break-word;
		overflow-wrap: break-word;
		max-width: 100%;
	}

	.fxbrokers-tab li p {
		font-size: 12px;
		margin: 4px 0;
		color: rgba(255, 255, 255, 0.85);
		line-height: 1.4;
		word-wrap: break-word;
		overflow-wrap: break-word;
		max-width: 100%;
		box-sizing: border-box;
	}

	.fxbrokers-tab li p span {
		display: block;
		margin-top: 2px;
		font-size: 11px;
		color: rgba(255, 255, 255, 0.7);
		white-space: normal;
		word-wrap: break-word;
		overflow-wrap: break-word;
		max-width: 100%;
	}

	/* Avg Spread Mobile Styles */
	.fxbrokers-tab li.avgspread {
		flex: 1 1 100%;
		order: 4;
		margin-top: 8px;
	}

	.fxbrokers-tab li.avgspread > p:first-child {
		font-weight: 600;
		color: rgba(255, 255, 255, 0.95);
		margin-bottom: 6px;
		font-size: 12px;
	}

	.fxbrokers-tab li.avgspread p[data-key="avg_spread"] {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: wrap !important;
		gap: 6px !important;
		margin-top: 0 !important;
		align-items: flex-start !important;
		justify-content: flex-start !important;
	}

	.fxbrokers-tab li.avgspread p[data-key="avg_spread"] span {
		display: inline-flex;
		flex: 0 1 auto;
		padding: 4px 8px;
		font-size: 11px;
		line-height: 1.4;
		word-break: break-word;
		white-space: normal;
		background: transparent;
		border: 1px solid rgba(255, 255, 255, 0.15);
		border-radius: 4px;
		color: rgba(255, 255, 255, 0.9);
		margin-bottom: 0;
		max-width: 100%;
	}

	.fxbrokers-cont > div:last-child {
		width: 100% !important;
		flex: 1 1 100% !important;
		padding-right: 0;
		margin-left: 0;
		margin-top: 8px;
		box-sizing: border-box;
	}

	.open-live-act {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		width: 100%;
		box-sizing: border-box;
	}

	.acc-btn {
		width: 100%;
		white-space: nowrap;
		padding: 14px 20px;
		font-size: 15px;
		font-weight: 600;
		border-radius: 8px;
		text-align: center;
		box-sizing: border-box;
	}
}

@media (max-width: 480px) {
	.fxbrokers-item {
		padding: 12px;
	}

	.fxbrokers-tab li img {
		max-width: 60px;
	}

	.fxbrokers-tab li label {
		font-size: 16px;
	}

	.fxbrokers-tab li p {
		font-size: 13px;
	}

	.fxbrokers-tab li.avgspread p[data-key="avg_spread"] span {
		font-size: 11px;
		padding: 6px 10px;
	}

	.acc-btn {
		font-size: 14px;
		padding: 12px 16px;
	}
}

/* Dark theme for form elements and specific classes */
textarea, 
input, 
select, 
.tw-bg-white p {
	color: var(--tve-color, rgba(255, 255, 255, 0.6)) !important;
	background: rgb(15, 15, 15) !important;
}

/* Ensure select options also have dark background */
select option {
	background: rgb(15, 15, 15) !important;
	color: rgba(255, 255, 255, 0.6) !important;
}

/* Override for input focus states to maintain green accent */
input:focus,
textarea:focus,
select:focus {
	border-color: #1d8315 !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(29, 131, 21, 0.3) !important;
}

/* Select2 Dark Theme Styling */
.select2-container {
	color: var(--tve-color, rgba(255, 255, 255, 0.6)) !important;
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
	background-color: rgb(15, 15, 15) !important;
	border: 1px solid #374151 !important;
	border-radius: 0.375rem !important;
	color: rgba(255, 255, 255, 0.6) !important;
	min-height: 38px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
	color: rgba(255, 255, 255, 0.6) !important;
	line-height: 36px !important;
	padding-left: 8px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 36px !important;
	right: 8px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
	border-color: rgba(255, 255, 255, 0.6) transparent transparent transparent !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
	border-color: transparent transparent rgba(255, 255, 255, 0.6) transparent !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
	background-color: rgba(29, 131, 21, 0.2) !important;
	border: 1px solid #1d8315 !important;
	color: rgba(255, 255, 255, 0.8) !important;
	padding: 2px 8px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
	color: rgba(255, 255, 255, 0.6) !important;
	margin-right: 5px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
	color: #f0f0f0 !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__clear {
	color: rgba(255, 255, 255, 0.6) !important;
	margin-right: 5px !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
	border-color: #1d8315 !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(29, 131, 21, 0.3) !important;
}

/* Select2 Dropdown */
.select2-dropdown {
	background-color: rgb(15, 15, 15) !important;
	border: 1px solid #374151 !important;
	border-radius: 0.375rem !important;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
	color: var(--tve-color, rgba(255, 255, 255, 0.6)) !important;
}

.select2-dropdown.select2-dropdown--below {
	background-color: rgb(15, 15, 15) !important;
}

.select2-dropdown.select2-dropdown--above {
	background-color: rgb(15, 15, 15) !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
	background-color: rgb(15, 15, 15) !important;
	border: 1px solid #374151 !important;
	color: rgba(255, 255, 255, 0.6) !important;
	border-radius: 0.25rem !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
	border-color: #1d8315 !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(29, 131, 21, 0.3) !important;
}

/* Select2 Results */
.select2-results {
	background-color: rgb(15, 15, 15) !important;
	color: var(--tve-color, rgba(255, 255, 255, 0.6)) !important;
}

.select2-results__options {
	background-color: rgb(15, 15, 15) !important;
	color: var(--tve-color, rgba(255, 255, 255, 0.6)) !important;
}

.select2-results ul {
	background-color: rgb(15, 15, 15) !important;
	color: var(--tve-color, rgba(255, 255, 255, 0.6)) !important;
}

.select2-results li {
	background-color: rgb(15, 15, 15) !important;
	color: var(--tve-color, rgba(255, 255, 255, 0.6)) !important;
}

.select2-container--default .select2-results__option {
	background-color: rgb(15, 15, 15) !important;
	color: rgba(255, 255, 255, 0.6) !important;
	padding: 8px 12px !important;
}

.select2-container--default .select2-results__option[aria-selected] {
	background-color: rgb(15, 15, 15) !important;
	color: rgba(255, 255, 255, 0.6) !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
	background-color: rgba(29, 131, 21, 0.2) !important;
	color: rgba(255, 255, 255, 0.8) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
	background-color: rgba(29, 131, 21, 0.3) !important;
	color: rgba(255, 255, 255, 0.9) !important;
}

.select2-container--default .select2-results__option.select2-results__option--highlighted {
	background-color: rgba(29, 131, 21, 0.3) !important;
	color: rgba(255, 255, 255, 0.9) !important;
}

.select2-container--default .select2-results__option[aria-disabled=true] {
	color: rgba(255, 255, 255, 0.3) !important;
}

.select2-container--default .select2-results__group {
	background-color: rgb(15, 15, 15) !important;
	color: rgba(255, 255, 255, 0.8) !important;
	font-weight: 600 !important;
	padding: 8px 12px !important;
}

/* Select2 Loading Spinner */
.select2-container--default .select2-selection--single .select2-selection__rendered .select2-selection__clear {
	color: rgba(255, 255, 255, 0.6) !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
	padding-right: 20px !important;
}