/* Reset and base styles */
:root {
  --tableau-blue: #005a8c;
  --tableau-light-blue: #489bc1;
  --tableau-accent: #e8762c;
  --tableau-gray: #4e5156;
  --tableau-light-gray: #e9e9e9;
  --tableau-success: #5cc75c;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: #333;
  background-color: #f9f9f9;
  line-height: 1.6;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  text-align: center;
}

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

.logo img {
  width: 100%;
  height: auto;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--tableau-gray);
}

h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--tableau-blue);
}

main {
  flex: 0 1 auto;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.hidden {
  display: none !important;
}

.state {
  text-align: center;
  padding: 1rem 0;
}

/* Timer styles */
#timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

#timer-display {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 0.5rem;
}

#timer-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 4px solid var(--tableau-light-gray);
  border-radius: 50%;
  border-top-color: var(--tableau-accent);
  transform: rotate(-90deg);
  transition: all 1s linear;
}

#timer-text {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--timer-color); /* Match the arc color */
  margin: 0;
  padding: 0;
}

/* Timer text below the visualization */
#timer-status {
  text-align: center;
  font-size: 1.1rem;
  color: #4B4B4B;
  margin-top: 0.5rem;
  display: none; /* Hide the redundant text below */
}

.tableau-timer-container {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 2rem;
}

.tableau-timer-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(
    var(--timer-color) 0% var(--progress-percent), 
    #EEEEEE var(--progress-percent) 100%
  );
  transform: rotate(-90deg);
}

.tableau-timer-mask {
  position: absolute;
  top: 15%;
  left: 15%;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.segment {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 8px;
  background: #ddd;
  transform-origin: bottom center;
}

.segment-major {
  height: 12px;
  width: 3px;
  background: #005A8C;
}

/* Voting options styles */
.instruction {
  margin-bottom: 1.5rem;
  color: var(--tableau-gray);
}

.voting-options {
  margin-bottom: 1.5rem;
}

.option {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 2px solid var(--tableau-light-gray);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.option:hover {
  border-color: var(--tableau-light-blue);
  background-color: rgba(72, 155, 193, 0.05);
}

.option.selected {
  border-color: var(--tableau-blue);
  background-color: rgba(0, 90, 140, 0.05);
}

.option-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--tableau-light-gray);
  color: var(--tableau-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-right: 1rem;
  flex-shrink: 0;
}

.option.selected .option-number {
  background-color: var(--tableau-blue);
  color: white;
}

.option-content {
  flex: 1;
  text-align: left;
}

.option-content h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.option-content p {
  font-size: 0.85rem;
  color: var(--tableau-gray);
}

.option-select {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--tableau-light-gray);
  margin-left: 1rem;
  flex-shrink: 0;
  position: relative;
}

.option.selected .option-select {
  border-color: var(--tableau-blue);
}

.option.selected .option-select:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  background-color: var(--tableau-blue);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Button styles */
.button {
  background-color: var(--tableau-blue);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button:hover {
  background-color: #004a73;
}

.button:active {
  transform: translateY(1px);
}

.button:disabled {
  background-color: var(--tableau-light-gray);
  color: #999;
  cursor: not-allowed;
}

/* Confirmation and error styles */
.success-icon {
  width: 64px;
  height: 64px;
  background-color: var(--tableau-success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem;
}

.selected-option {
  margin: 1rem auto;
  max-width: 80%;
  padding: 1rem;
  background-color: rgba(0, 90, 140, 0.05);
  border-radius: 8px;
  font-weight: 500;
}

.error-message {
  color: #d9534f;
  margin-top: 1rem;
  padding: 0.5rem;
  border-radius: 4px;
  background-color: rgba(217, 83, 79, 0.1);
}

/* Footer styles */
footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--tableau-gray);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .container {
    padding: 0.75rem;
  }

  h1 {
    font-size: 1.25rem;
  }

  main {
    padding: 1rem;
  }

  .option {
    padding: 0.75rem;
  }

  .option-number {
    width: 30px;
    height: 30px;
    margin-right: 0.75rem;
  }

  .option-content h3 {
    font-size: 0.95rem;
  }

  .option-content p {
    font-size: 0.8rem;
  }
}