:root {
    --primary: #21b3b5;
    --bg: #f5f7fa;
    --fg: #333;
    --card-bg: #fff;
    --radius: 12px;
    --shadow: rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    margin: 0;
    padding: 1rem;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--fg);
    /* allow vertical scrolling */
    height: auto;
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    -webkit-user-select: none;
    user-select: none;
}

#content {
    opacity: 0;
    transition: opacity 0.3s ease;
    
}
body.app-visible #content { 
	opacity: 1;
}


.survey-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px var(--shadow);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
    margin: 0rem auto;
    min-width: 280px;
}

.survey-card.collapsed {
    padding: 2rem 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transform: scale(0.98);
}


.logo {
    max-width: 100px;
    margin-bottom: 1rem;
}

h2,
h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.question-block {
    text-align: center;
}

h4 {
    font-size: 1.1rem;
    padding: .5rem 0;
}
.question-block .aspect-row {
  align-items: center;
  padding: .5rem 0;
}
.aspect-label {
  flex: 1;
}


#comment-section,
.question-block,
#primary-question,
.rating-box {
    margin-bottom: 1rem;
}

.stars {
	height: 56px; 
	line-height: 1;
    display: flex;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    align-items: center;    
}

.stars,
.stars span {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    outline: none;
}

.stars.large span {
    font-size: 2rem;
}

.stars:focus,
.stars:active {
    background-color: transparent;
}

.stars span {
    display: inline-block;
    font-size: 2rem;
    color: #ccc;
    transition: color 0.2s;
    padding: 0.25rem;
}

.stars span:focus {
    outline: none;
}

.stars span.filled {
    color: var(--primary);
}

.prompt {
    font-size: 16px;
    margin-bottom: 0.5em  
}

.nps-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-top: 0.25em;
}

label[for="message"],
textarea#message {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
}

#step2 {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height .35s ease, opacity .35s ease, transform .35s ease;
}

#step2.active {
    /* JS will set max-height to an exact px value */
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  #step2 { transition: none; }
}


#feedback-form {
    transition: opacity 0.4s ease;
}

#feedback-form.hidden {
    opacity: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
}

#thanks {
    display: none;
    font-size: 1.2rem;
}
#thanks:has(br) { 
	text-align: left; 
}

#thanks.visible {
    display: block;
    animation: fadeIn 0.5s ease forwards;
}

#submit-button {
    background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    margin: 0.75rem;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* make the button itself look like a spinner */
#submit-button.loading {
    /* size it */
    width: 40px;
    height: 40px;
    padding: 0;
    /* spinner borders */
    border: 4px solid #eee;
    border-top-color: var(--primary);
    border-radius: 50%;
    /* spin animation */
    animation: spin 1s linear infinite;
    /* hide its text/icon */
    color: transparent;
    background-color: transparent;
    pointer-events: none;
}

/* keyframes already in your CSS */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.stars.smiley span {
    display: inline-block;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.stars.smiley span:not(.selected):hover {
    transform: scale(1.4);
}

.stars.smiley span.selected {
    transform: scale(1.2);
    font-weight: bold;
    border-radius: 50%;
    background-color: rgba(0, 128, 255, 0.15);
    text-shadow: 0 0 3px var(--primary);
}

.stars.smiley span:active {
    animation: bounce 0.4s ease;
}

/* Uniform SVG heart sizing and alignment */
.stars.heart span {
	line-height: 1;
	display: inline-flex;
}

.stars.heart .heart-icon {
	width: 1em;
	height: 1em;
	display: block;
    overflow: visible	
}

/* Empty (default): stroke only */
.stars.heart .heart-shape {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 24;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* Filled state */
.stars.heart span.filled .heart-shape {
  fill: var(--primary);
  stroke: transparent;
}

#wyapy-footer {
  display: none;
  box-sizing: border-box;
  width: 100%;
  margin-top: 16px;
  padding: 12px 16px;
  color: grey;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

#wyapy-footer a { color: inherit; text-decoration: underline; }

@media (max-width: 480px) {
  #wyapy-footer { padding: 10px 12px; font-size: 11.5px; }
}

@keyframes bounce {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.4);
    }

    60% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1.2);
    }
}


@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#loader.fade-out {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}


@media (max-width: 480px) {
    .survey-card {
        padding: 1rem;
    }

    .stars span {
        font-size: 1.6rem;
    }

    .nps-labels {
        font-size: 0.75rem;
    }
}

@media (max-width: 400px) {

    .stars span {
        font-size: 1.5rem;
    }

    html,
    body {
        padding: 0.5rem;
    }
}


@media (max-width: 350px) {

    .stars span {
        font-size: 1.25rem;
    }

}