/* =====================================================
   UNITEL T+ DOCUMENT VERIFICATION - STYLES
   Brand Colors extracted from uniteltmais.cv
   ===================================================== */

/* CSS Variables - Brand Colors */
:root {
  --primary-orange: #ff6b00;
  --primary-orange-dark: #e55a00;
  --primary-orange-light: #ff8533;
  --secondary-purple: #9b59b6;
  --accent-red: #e74c3c;
  --text-dark: #333333;
  --text-gray: #666666;
  --text-light: #999999;
  --bg-light: #fff5f0;
  --bg-white: #ffffff;
  --bg-gray: #f5f5f5;
  --success-green: #27ae60;
  --error-red: #e74c3c;
  --border-color: #e0e0e0;
  --shadow: 0 4px 20px rgba(255, 107, 0, 0.15);
  --shadow-hover: 0 8px 30px rgba(255, 107, 0, 0.25);
  --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
  min-height: 100vh;
  color: var(--text-dark);
  line-height: 1.6;
}

/* Container */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

/* Header */
.header {
  text-align: center;
  padding: 30px 0;
  border-bottom: 3px solid var(--primary-orange);
  margin-bottom: 30px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.logo-image {
  height: 50px;
  width: auto;
  max-width: 100%;
}

/* Legacy logo styles */
.logo-icon {
  width: 50px;
  height: 50px;
  background: var(--primary-orange);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 24px;
}

.logo-text {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-orange);
}

.logo-text span {
  color: var(--secondary-purple);
}

.header h1 {
  color: var(--text-dark);
  font-size: 24px;
  margin-top: 15px;
}

.header p {
  color: var(--text-gray);
  font-size: 14px;
  margin-top: 5px;
}

/* Progress Steps */
.progress-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
  padding: 0 20px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.step-circle {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--bg-gray);
  border: 3px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--text-light);
  transition: var(--transition);
  font-size: 16px;
}

.step-circle.active {
  background: var(--primary-orange);
  border-color: var(--primary-orange);
  color: white;
  box-shadow: 0 0 15px rgba(255, 107, 0, 0.4);
}

.step-circle.completed {
  background: var(--success-green);
  border-color: var(--success-green);
  color: white;
}

.step-label {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
  max-width: 80px;
}

.step-label.active {
  color: var(--primary-orange);
  font-weight: 600;
}

.progress-line {
  width: 80px;
  height: 4px;
  background: var(--border-color);
  margin: 0 10px;
  margin-bottom: 25px;
  border-radius: 2px;
  transition: var(--transition);
}

.progress-line.completed {
  background: var(--success-green);
}

/* Cards */
.card {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title .icon {
  width: 35px;
  height: 35px;
  background: linear-gradient(
    135deg,
    var(--primary-orange),
    var(--primary-orange-light)
  );
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

/* Upload Areas */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.upload-grid.single {
  grid-template-columns: 1fr;
  max-width: 300px;
  margin: 0 auto;
}

.upload-box {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-gray);
  position: relative;
  overflow: hidden;
}

.upload-box:hover {
  border-color: var(--primary-orange);
  background: var(--bg-light);
}

.upload-box.has-file {
  border-color: var(--success-green);
  border-style: solid;
  background: #f0fff4;
}

.upload-box.error {
  border-color: var(--error-red);
  background: #fff5f5;
}

.upload-icon {
  font-size: 40px;
  margin-bottom: 10px;
  color: var(--text-light);
}

.upload-box.has-file .upload-icon {
  color: var(--success-green);
}

.upload-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.upload-hint {
  font-size: 12px;
  color: var(--text-light);
}

.upload-input {
  display: none;
}

/* Image Preview */
.preview-container {
  position: relative;
  width: 100%;
  margin-top: 15px;
}

.preview-image {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--success-green);
}

.remove-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  background: var(--error-red);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.remove-btn:hover {
  background: #c0392b;
  transform: scale(1.1);
}

/* Video Recording Section */
.video-section {
  display: none;
}

.video-section.active {
  display: block;
}

.video-container {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  margin-bottom: 20px;
  max-height: 500px;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  transition: var(--transition);
}

.video-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.video-overlay .icon {
  font-size: 60px;
  margin-bottom: 15px;
  opacity: 0.8;
}

.video-overlay p {
  font-size: 16px;
  opacity: 0.9;
}

/* Timer */
.timer-display {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 18px;
  font-weight: bold;
  display: none;
}

.timer-display.active {
  display: block;
}

.timer-display.warning {
  background: var(--error-red);
  animation: pulse 0.5s ease infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Recording Indicator */
.recording-indicator {
  position: absolute;
  top: 15px;
  left: 70px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--error-red);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  display: none;
}

.recording-indicator.active {
  display: flex;
}

.recording-dot {
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  animation: blink 1s ease infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* Camera Switch Button (Mobile Only) */
.camera-switch-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 45px;
  height: 45px;
  background: rgba(255, 107, 0, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: bold;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
  z-index: 10;
  color: white;
}

.camera-switch-btn:hover {
  background: var(--primary-orange-dark);
  transform: scale(1.05);
}

.camera-switch-btn:active {
  transform: scale(0.9);
}

.camera-switch-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.camera-switch-btn span {
  line-height: 1;
  display: block;
}

/* Hide camera switch on desktop */
@media (min-width: 769px) {
  .camera-switch-btn {
    display: none !important;
  }
}

/* Video Controls */
.video-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  padding: 14px 32px;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 140px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-orange),
    var(--primary-orange-dark)
  );
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
}

.btn-secondary {
  background: var(--bg-gray);
  color: var(--text-dark);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--primary-orange);
  color: var(--primary-orange);
}

.btn-danger {
  background: var(--error-red);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #c0392b;
}

.btn-success {
  background: var(--success-green);
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: #219a52;
}

.btn-record {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  padding: 0;
  min-width: auto;
  font-size: 24px;
}

.btn-full {
  width: 100%;
  margin-top: 25px;
}

/* Error Messages */
.error-message {
  background: #fff5f5;
  border: 1px solid var(--error-red);
  border-radius: 10px;
  padding: 15px;
  margin-top: 15px;
  display: none;
}

.error-message.show {
  display: flex;
  align-items: center;
  gap: 10px;
}

.error-message .icon {
  color: var(--error-red);
  font-size: 20px;
}

.error-message p {
  color: var(--error-red);
  font-size: 14px;
}

/* Success Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

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

.modal {
  background: white;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  transform: scale(0.8);
  transition: var(--transition);
}

.modal-overlay.show .modal {
  transform: scale(1);
}

.success-icon {
  width: 100px;
  height: 100px;
  background: var(--success-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  animation: successPop 0.5s ease;
}

@keyframes successPop {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.success-icon .checkmark {
  font-size: 50px;
  color: white;
}

.modal h2 {
  color: var(--text-dark);
  font-size: 24px;
  margin-bottom: 10px;
}

.modal p {
  color: var(--text-gray);
  font-size: 14px;
  margin-bottom: 25px;
}

.redirect-text {
  color: var(--text-light);
  font-size: 13px;
}

/* Landing Page Styles */
.landing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
}

.landing-header {
  text-align: center;
  margin-bottom: 50px;
}

.landing-header h1 {
  font-size: 32px;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.landing-header p {
  color: var(--text-gray);
  font-size: 16px;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  max-width: 600px;
  width: 100%;
}

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

.option-card {
  background: var(--bg-white);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  border: 3px solid transparent;
  text-decoration: none;
  color: inherit;
}

.option-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-orange);
}

.option-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    var(--primary-orange),
    var(--primary-orange-light)
  );
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 40px;
  color: white;
}

.option-card h3 {
  font-size: 20px;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.option-card p {
  color: var(--text-gray);
  font-size: 14px;
  line-height: 1.5;
}

/* Camera Permission Error */
.camera-error {
  background: #fff5f5;
  border: 2px solid var(--error-red);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  margin: 20px 0;
}

.camera-error .icon {
  font-size: 50px;
  color: var(--error-red);
  margin-bottom: 15px;
}

.camera-error h3 {
  color: var(--error-red);
  margin-bottom: 10px;
}

.camera-error p {
  color: var(--text-gray);
  font-size: 14px;
  margin-bottom: 20px;
}

.camera-error ul {
  text-align: left;
  color: var(--text-gray);
  font-size: 13px;
  margin: 15px 0;
  padding-left: 20px;
}

.camera-error li {
  margin-bottom: 8px;
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--bg-gray);
  border-top-color: var(--primary-orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Info Box */
.info-box {
  background: var(--bg-light);
  border-left: 4px solid var(--primary-orange);
  padding: 15px;
  border-radius: 0 8px 8px 0;
  margin-top: 20px;
}

.info-box p {
  color: var(--text-gray);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.info-box .icon {
  color: var(--primary-orange);
  font-size: 18px;
  flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 480px) {
  .container {
    padding: 15px;
  }

  .header {
    padding: 20px 0;
  }

  .logo-text {
    font-size: 24px;
  }

  .header h1 {
    font-size: 20px;
  }

  .card {
    padding: 20px;
  }

  .upload-grid {
    grid-template-columns: 1fr;
  }

  .upload-box {
    padding: 25px 15px;
  }

  .progress-line {
    width: 50px;
  }

  .step-circle {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 14px;
  }

  .btn-full {
    margin-top: 20px;
  }

  .video-controls {
    gap: 10px;
  }

  .video-container {
    aspect-ratio: 16/9;
    max-height: 50vh;
    border-radius: 8px;
    margin-bottom: 15px;
  }

  .video-container video {
    object-fit: contain;
  }

  .timer-display {
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 16px;
    border-radius: 15px;
  }

  .recording-indicator {
    top: 10px;
    left: 60px;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 15px;
  }

  .camera-switch-btn {
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .btn-record {
    width: 65px;
    height: 65px;
    font-size: 22px;
  }

  .landing-header h1 {
    font-size: 26px;
  }

  .logo-image {
    height: 40px;
  }

  .option-card {
    padding: 30px 20px;
  }

  .option-icon {
    width: 60px;
    height: 60px;
    font-size: 30px;
  }
}

/* Hide sections by default */
.step-section {
  display: none;
}

.step-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* WhatsApp Button Style */
.btn-whatsapp {
  background: #25d366;
  color: white;
}

.btn-whatsapp:hover:not(:disabled) {
  background: #128c7e;
}
