/* Survey Modal Styles */
.survey-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Matches other modals like cookies */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.survey-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.survey-modal-content {
    background: var(--bg-secondary);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.survey-modal-overlay.active .survey-modal-content {
    transform: translateY(0);
}

.survey-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    line-height: 1;
}

.survey-close-btn:hover {
    color: var(--text-color);
}

/* Initial Prompt State */
.survey-prompt {
    text-align: center;
}

.survey-prompt h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--text-color);
}

.survey-prompt p {
    margin-bottom: 2rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.survey-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.survey-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.survey-btn-primary {
    background: var(--accent-color);
    color: #ffffff; /* Always white on accent color for contrast */
}

.survey-btn-primary:hover {
    background: var(--accent-color-dark);
}

.survey-btn-secondary {
    background: var(--button-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.survey-btn-secondary:hover {
    background: var(--button-bg-hover);
}

.survey-btn-link {
    background: none;
    color: var(--text-muted);
    text-decoration: underline;
    font-size: 0.9rem;
    padding: 0.5rem;
}

.survey-btn-link:hover {
    color: var(--text-color);
}

/* Survey Form Container */
#survey-form-container {
    animation: fadeIn 0.3s ease;
}

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

/* Default styles for injected HTML forms (can be overridden by inline styles) */
#dynamic-survey-form .form-group {
    margin-bottom: 1.5rem;
}

#dynamic-survey-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

#dynamic-survey-form input[type="text"],
#dynamic-survey-form input[type="email"],
#dynamic-survey-form textarea,
#dynamic-survey-form select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-color);
}

#dynamic-survey-form button[type="submit"] {
    width: 100%;
    padding: 1rem;
    background: var(--accent-color);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

#dynamic-survey-form button[type="submit"]:hover {
    background: var(--accent-color-dark);
}

.survey-thank-you {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-color);
}

.survey-icon-success {
    font-size: 3rem;
    color: var(--accent-color); /* Use theme accent instead of hardcoded green */
    margin-bottom: 1rem;
}