/* --- Modern Modal Redesign (Suggest, Report, Review) --- */
:root {
	--modal-primary: #e686cd;
	--modal-secondary: #1e293b;
	--modal-text-slate: #475569;
	--modal-bg-slate: #f8fafc;
	--modal-border: #e2e8f0;
	--modal-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

#formSuggest,
#formReport,
#formReview {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(12px);
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	visibility: hidden;
	opacity: 0;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	padding: 20px;
	box-sizing: border-box;
}

#formSuggest.show,
#formReport.show,
#formReview.show {
	visibility: visible;
	opacity: 1;
}

.modern-form {
	background: white;
	width: 100%;
	max-width: 700px;
	max-height: 90vh;
	border-radius: 24px;
	box-shadow: var(--modal-shadow);
	display: flex;
	flex-direction: column;
	position: relative;
	overflow: hidden;
	animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
	from {
		transform: translateY(30px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.close-btn {
	position: absolute;
	top: 20px;
	right: 20px;
	background: #f1f5f9;
	border: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s;
	z-index: 10;
}

.close-btn:hover {
	background: #e2e8f0;
	transform: rotate(90deg);
}

.form-scroll-content {
	padding: 40px;
	overflow-y: auto;
	flex: 1;
}

.form-header {
	margin-bottom: 30px;
	text-align: center;
}

.formTitle {
	font-size: 1.75rem;
	font-weight: 800;
	color: var(--modal-secondary);
	margin-bottom: 8px;
}

.formSubtitle {
	color: var(--modal-text-slate);
	font-size: 0.95rem;
}

.section-label {
	display: block;
	font-weight: 700;
	color: var(--modal-secondary);
	margin-bottom: 20px;
	font-size: 1.1rem;
}

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

.form-group label {
	display: block;
	font-weight: 600;
	color: var(--modal-text-slate);
	margin-bottom: 8px;
	font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.explanation-box input,
.explanation-box textarea,
.modern-select {
	width: 100%;
	background: var(--modal-bg-slate);
	border: 2px solid #f1f5f9;
	border-radius: 12px;
	padding: 14px 18px;
	font-family: inherit;
	font-size: 1rem;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-sizing: border-box;
	color: var(--modal-secondary);
}

.modern-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
}

.modern-select[multiple] {
    background-image: none;
}

.explanation-box label {
    display: block;
    font-weight: 600;
    color: var(--modal-text-slate);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.modern-select {
    min-height: 120px;
    padding: 8px;
}

.explanation-box {
    margin-bottom: 24px;
}

.form-group textarea {
	min-height: 100px;
	resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.explanation-box textarea:focus,
.modern-select:focus {
	outline: none;
	border-color: var(--modal-primary);
	background: white;
	box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.1);
}

/* Reason Cards Grid (for Report) */
.reason-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
	margin-bottom: 30px;
}

.reason-card {
	cursor: pointer;
	position: relative;
}

.reason-card input[type="radio"] {
	position: absolute;
	opacity: 0;
}

.reason-card .card-content {
	background: var(--modal-bg-slate);
	border: 2px solid #f1f5f9;
	border-radius: 16px;
	padding: 16px;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	box-sizing: border-box;
}

.reason-card:hover .card-content {
	border-color: var(--modal-primary);
	background: #fff;
	transform: translateY(-4px);
	box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.1);
}

.reason-card .icon-box {
	width: 44px;
	height: 44px;
	background: white;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 12px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
	transition: transform 0.3s ease;
}

.reason-card:hover .icon-box {
	transform: scale(1.1);
}

.reason-card .icon-box img {
	width: 24px;
	height: 24px;
}

.reason-card span {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--modal-text-slate);
	line-height: 1.2;
}

.reason-card input[type="radio"]:checked+.card-content {
	border-color: var(--modal-primary);
	background: rgba(233, 30, 99, 0.05);
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.reason-card.highlight .card-content {
	border-style: dashed;
}

/* Modal Footer */
.form-footer {
	padding: 20px 40px;
	background: var(--modal-bg-slate);
	border-top: 1px solid var(--modal-border);
	display: flex;
	gap: 16px;
	justify-content: flex-end;
}

.btn-cancel {
	padding: 12px 24px;
	border-radius: 12px;
	border: 1px solid var(--modal-border);
	background: white;
	color: var(--modal-text-slate);
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
}

.btn-cancel:hover {
	background: #f1f5f9;
}

.btn-submit {
	padding: 12px 32px;
	border-radius: 12px;
	border: none;
	background: var(--modal-primary);
	color: white;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s;
	box-shadow: 0 4px 6px -1px rgba(233, 30, 99, 0.3);
}

.btn-submit:hover {
	filter: brightness(1.1);
	transform: translateY(-1px);
	box-shadow: 0 10px 15px -3px rgba(233, 30, 99, 0.4);
}

/* Success State */
.success-state {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Specific styles for Review Form content (some might still be in places-info.css if they use unique IDs) */
#formReview .modern-rating-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 8px;
}

#formReview .modern-rating-stars input {
    display: none;
}

#formReview .modern-rating-stars label {
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
}

#formReview .modern-rating-stars label:hover,
#formReview .modern-rating-stars label:hover ~ label,
#formReview .modern-rating-stars input:checked ~ label {
    color: #fbbf24;
}

/* User Badge */
.modern-user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--modal-bg-slate);
    padding: 8px 16px;
    border-radius: 100px;
    width: fit-content;
    margin-top: 12px;
    border: 1px solid var(--modal-border);
}

.modern-user-badge .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--modal-border);
}

.modern-user-badge .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modern-user-badge .user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--modal-secondary);
}

/* Modern Services List (Review Form) */
.modern-services-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 680px) {
    .modern-services-list {
        grid-template-columns: 1fr;
    }
}

.service-item {
    background: var(--modal-bg-slate);
    border: 1px solid var(--modal-border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s ease;
}

.service-item:focus-within {
    border-color: var(--modal-primary);
}

.service-question {
    font-weight: 600;
    color: var(--modal-text-slate);
    font-size: 0.95rem;
}

.service-options {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.service-opt-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: white;
    border: 1px solid var(--modal-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.service-opt-btn img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.service-opt-btn:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.service-opt-btn.selected {
    border-color: var(--modal-primary);
    background: rgba(233, 30, 99, 0.05);
}

.service-opt-btn.selected img {
    opacity: 1;
}

.service-stars, .service-pills {
    display: flex;
    gap: 4px;
    margin-left: 4px;
}

.service-star-btn {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-star-btn img {
    width: 100%;
    height: 100%;
}

.service-pill-btn {
    padding: 6px 12px;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--modal-border);
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.service-pill-btn:hover {
    background: #f1f5f9;
}

.service-pill-btn.selected {
    background: var(--modal-primary);
    color: white;
    border-color: var(--modal-primary);
}

/* Suggest Form specific styles */
.fields-section {
    display: none;
    border-top: 1px solid var(--modal-border);
    padding-top: 30px;
    margin-top: 10px;
    animation: fadeIn 0.3s ease;
}

#formSuggest.fields-visible .fields-section {
    display: block;
}

.fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .fields-grid {
        grid-template-columns: 1fr;
    }
}

.form-group.full-width {
    grid-column: span 2;
}

@media (max-width: 600px) {
    .form-group.full-width {
        grid-column: span 1;
    }
}

/* Success Animation (Checkmark) */
.success-animation {
    display: none;
    text-align: center;
    padding: 40px 0;
}

.success-animation p {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--modal-secondary);
    animation: fadeInText 0.5s 1s ease-out forwards;
    opacity: 0;
}

#review-form-content.is-success .form-actual-content,
#review-form-content.is-success .form-footer {
    display: none;
}

#review-form-content.is-success .success-animation {
    display: block;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #4caf50;
    stroke-miterlimit: 10;
    margin: 0 auto 20px;
    box-shadow: inset 0px 0px 0px #4caf50;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #4caf50;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}

@keyframes fill {
    100% { box-shadow: inset 0px 0px 0px 40px #4caf50; }
}

@keyframes fadeInText {
    to { opacity: 1; }
}
