/**
 * Bulledop Matching - Styles
 */

/* Profile form */
.bulledop-profile-form {
	max-width: 600px;
	margin: 0 auto;
}

.bulledop-profile-form .form-group {
	margin-bottom: 1rem;
}

.bulledop-profile-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.bulledop-profile-form input[type="text"],
.bulledop-profile-form select {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.bulledop-profile-form .form-row {
	display: flex;
	gap: 1rem;
}

.bulledop-profile-form .form-row .form-group {
	flex: 1;
}

/* Visibility warning */
.bulledop-visibility-warning {
	padding: 1rem;
	background: #fff3cd;
	border: 1px solid #ffeaa7;
	border-radius: 6px;
	margin-bottom: 1.5rem;
	color: #856404;
}

.bulledop-visibility-warning strong {
	display: block;
	margin-bottom: 0.5rem;
}

/* Display name info */
.bulledop-display-name-info {
	padding: 0.75rem 1rem;
	background: #e8f4fd;
	border: 1px solid #bee5eb;
	border-radius: 6px;
	margin-bottom: 1.5rem;
	font-size: 0.95rem;
}

.bulledop-display-name-label {
	color: #555;
	margin-right: 0.25rem;
}

/* Field visibility warning */
.bulledop-field-visible {
	display: block;
	font-size: 0.8rem;
	color: #b45309;
	margin-top: 0.25rem;
	font-weight: 400;
	font-style: italic;
}

/* Pen name toggle */
.bulledop-pen-name-toggle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

/* Penpal space */
.bulledop-penpal-space {
	max-width: 700px;
	margin: 0 auto;
}

/* Penpal card */
.bulledop-penpal-card {
	padding: 1.5rem;
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	margin-bottom: 1.5rem;
}

.bulledop-penpal-card h3 {
	margin-top: 0;
	margin-bottom: 1rem;
	color: #333;
}

.bulledop-penpal-card .penpal-name {
	font-size: 1.25rem;
	font-weight: 700;
	color: #0073aa;
	margin-bottom: 0.5rem;
}

.bulledop-penpal-card .penpal-address {
	line-height: 1.6;
	color: #555;
}

.bulledop-penpal-card .penpal-distance {
	margin-top: 0.75rem;
	font-size: 0.9rem;
	color: #888;
}

/* Theme section */
.bulledop-theme-section {
	padding: 1.5rem;
	background: #e8f4fd;
	border: 1px solid #bee5eb;
	border-radius: 8px;
	margin-bottom: 1.5rem;
}

.bulledop-theme-section h3 {
	margin-top: 0;
	color: #0c5460;
}

.bulledop-theme-section .theme-title {
	font-size: 1.1rem;
	font-weight: 600;
}

.bulledop-theme-section .theme-link {
	display: inline-block;
	margin-top: 0.75rem;
}

/* Letter tracking */
.bulledop-letter-tracking {
	margin-bottom: 1.5rem;
}

.bulledop-letter-tracking table {
	width: 100%;
	border-collapse: collapse;
}

.bulledop-letter-tracking th,
.bulledop-letter-tracking td {
	padding: 0.75rem;
	text-align: left;
	border-bottom: 1px solid #dee2e6;
}

.bulledop-letter-tracking th {
	background: #f8f9fa;
	font-weight: 600;
}

/* Status badges */
.bulledop-status {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	border-radius: 12px;
	font-size: 0.85rem;
	font-weight: 600;
}

.bulledop-status.status-pending {
	background: #f8d7da;
	color: #721c24;
}

.bulledop-status.status-sent {
	background: #fff3cd;
	color: #856404;
}

.bulledop-status.status-received {
	background: #d4edda;
	color: #155724;
}

/* Action buttons */
.bulledop-action-btn {
	display: inline-block;
	padding: 0.5rem 1.25rem;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.9rem;
	transition: background 0.2s;
}

.bulledop-action-btn.btn-send {
	background: #0073aa;
	color: #fff;
}

.bulledop-action-btn.btn-send:hover {
	background: #005a87;
}

.bulledop-action-btn.btn-receive {
	background: #28a745;
	color: #fff;
}

.bulledop-action-btn.btn-receive:hover {
	background: #218838;
}

.bulledop-action-btn:disabled {
	background: #ccc;
	color: #666;
	cursor: not-allowed;
}

/* No match message */
.bulledop-no-match {
	padding: 2rem;
	text-align: center;
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	color: #666;
}

/* Profile incomplete notice */
.bulledop-profile-incomplete {
	padding: 1.5rem;
	background: #f8d7da;
	border: 1px solid #f5c6cb;
	border-radius: 8px;
	text-align: center;
	color: #721c24;
}

.bulledop-profile-incomplete a {
	color: #721c24;
	font-weight: 600;
}

/* Messages */
.bulledop-success {
	padding: 0.75rem 1rem;
	background: #d4edda;
	border: 1px solid #c3e6cb;
	border-radius: 4px;
	color: #155724;
	margin-bottom: 1rem;
}

.bulledop-error {
	padding: 0.75rem 1rem;
	background: #f8d7da;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
	color: #721c24;
	margin-bottom: 1rem;
}

/* Messaging */
.bulledop-messaging h3 {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.bulledop-unread-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 10px;
	background: #dc3545;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
}

.bulledop-msg-layout {
	display: flex;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	overflow: hidden;
	min-height: 400px;
}

.bulledop-msg-contacts {
	width: 200px;
	flex-shrink: 0;
	border-right: 1px solid #dee2e6;
	background: #f8f9fa;
	overflow-y: auto;
}

.contact-month {
	font-size: 0.7rem;
	color: #888;
	white-space: nowrap;
}

.bulledop-msg-contact.active .contact-month {
	color: rgba(255,255,255,0.7);
}

.bulledop-msg-contact {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.75rem;
	cursor: pointer;
	border-bottom: 1px solid #e9ecef;
	transition: background 0.15s;
}

.bulledop-msg-contact:hover {
	background: #e9ecef;
}

.bulledop-msg-contact.active {
	background: #0073aa;
	color: #fff;
}

.bulledop-msg-contact.active .contact-badge {
	background: rgba(255,255,255,0.25);
	color: #fff;
}

.contact-name {
	flex: 1;
	font-weight: 600;
	font-size: 0.9rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.contact-badge {
	font-size: 0.7rem;
	padding: 2px 6px;
	border-radius: 8px;
	background: #d4edda;
	color: #155724;
	font-weight: 600;
}

.bulledop-msg-conversation {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.bulledop-msg-placeholder,
.bulledop-msg-loading,
.bulledop-msg-error {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1;
	color: #888;
	padding: 2rem;
	text-align: center;
}

.bulledop-msg-error {
	color: #721c24;
}

.bulledop-msg-list {
	flex: 1;
	overflow-y: auto;
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	max-height: 350px;
}

.bulledop-msg-empty {
	color: #888;
	text-align: center;
	padding: 2rem;
}

.bulledop-msg-bubble {
	max-width: 75%;
	padding: 0.5rem 0.75rem;
	border-radius: 12px;
	word-wrap: break-word;
}

.bulledop-msg-bubble.mine {
	align-self: flex-end;
	background: #0073aa;
	color: #fff;
	border-bottom-right-radius: 4px;
}

.bulledop-msg-bubble.theirs {
	align-self: flex-start;
	background: #e9ecef;
	color: #333;
	border-bottom-left-radius: 4px;
}

.msg-content {
	line-height: 1.4;
	white-space: pre-wrap;
}

.msg-meta {
	font-size: 0.7rem;
	margin-top: 0.25rem;
	opacity: 0.7;
}

.bulledop-msg-report {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 0.8rem;
	opacity: 0.6;
	padding: 0;
	color: inherit;
}

.bulledop-msg-report:hover {
	opacity: 1;
	color: #dc3545;
}

.msg-reported {
	color: #dc3545;
	font-weight: 600;
}

.bulledop-msg-bubble.mine .msg-reported {
	color: #ffc0cb;
}

.bulledop-msg-form {
	display: flex;
	gap: 0.5rem;
	padding: 0.75rem;
	border-top: 1px solid #dee2e6;
	background: #f8f9fa;
}

.bulledop-msg-form textarea {
	flex: 1;
	resize: none;
	border: 1px solid #ccc;
	border-radius: 6px;
	padding: 0.5rem;
	font-family: inherit;
	font-size: 0.9rem;
}

.bulledop-msg-form-actions {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	align-self: flex-end;
}

.bulledop-action-btn.btn-block {
	background: #fff;
	color: #dc3545;
	border: 1px solid #dc3545;
	font-size: 0.75rem;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	cursor: pointer;
}

.bulledop-action-btn.btn-block:hover {
	background: #dc3545;
	color: #fff;
}

/* Report modal */
.bulledop-report-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0,0,0,0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
}

.bulledop-report-modal {
	background: #fff;
	border-radius: 8px;
	padding: 1.5rem;
	max-width: 450px;
	width: 90%;
	box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.bulledop-report-modal h4 {
	margin: 0 0 1rem;
	font-size: 1.1rem;
}

.bulledop-report-warning {
	padding: 0.75rem 1rem;
	background: #fff3cd;
	border: 1px solid #ffeaa7;
	border-radius: 6px;
	color: #856404;
	margin-bottom: 1rem;
	line-height: 1.5;
}

.bulledop-report-actions {
	display: flex;
	gap: 0.5rem;
	justify-content: flex-end;
}

.bulledop-report-confirm {
	background: #dc3545 !important;
}

.bulledop-report-confirm:hover {
	background: #c82333 !important;
}

.bulledop-report-cancel {
	background: #6c757d !important;
	color: #fff !important;
}

.bulledop-report-cancel:hover {
	background: #5a6268 !important;
}

@media (max-width: 600px) {
	.bulledop-msg-layout {
		flex-direction: column;
		min-height: auto;
	}

	.bulledop-msg-contacts {
		width: 100%;
		border-right: none;
		border-bottom: 1px solid #dee2e6;
		display: flex;
		overflow-x: auto;
		overflow-y: hidden;
	}

	.bulledop-msg-contact {
		border-bottom: none;
		border-right: 1px solid #e9ecef;
		white-space: nowrap;
	}

	.bulledop-msg-list {
		max-height: 300px;
	}
}
