/* ============================================
   BASE & BODY
   ============================================ */
* { box-sizing: border-box; }

body {
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: #333;
  background-color: #eee;
  background-image: url("../images/bg.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  background-position: center center;
  margin: 0;
  padding: 0;
}

h1 {
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  font-size: 24px !important;
  font-weight: 700;
}

h2 {
  font-size: 18px !important;
  font-weight: 700;
}

h3, h4, h5 {
  font-family: 'Roboto Condensed', sans-serif;
}

h4 {
  font-size: 18px;
  font-weight: 300;
}

a { color: #3F51B5; }
a:hover { color: #303F9F; }

label { color: #000 !important; }

/* ============================================
   NAVBAR
   ============================================ */
nav.navbar {
  background: #611232 !important;
  border: none;
  border-radius: 0;
  padding-bottom: 23px;
  padding-left: 55px;
  padding-right: 55px;
  margin-bottom: 0;
  min-height: 60px;
}

.navbar-brand {
  padding: 15px;
  height: 60px;
}

.navbar-brand img {
  height: 49px;
  width: auto;
}

.link-nav {
  padding-right: 0.5rem;
  padding-left: 1.5rem;
  padding-top: 1.8rem;
  color: #fff !important;
  height: 45px;
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  font-weight: 300;
  text-align: center;
}

.link-nav:hover {
  color: #ddd !important;
  text-decoration: none;
}

.navbar-inverse .navbar-toggle {
  border-color: transparent;
}

.navbar-inverse .navbar-toggle .icon-bar {
  background-color: #fff;
}

.navbar-inverse .navbar-collapse {
  border-color: transparent;
}

/* ============================================
   MAIN CONTAINER & WELL
   ============================================ */
.main-container {
  position: relative;
  padding-top: 164px;
}

.well.page {
  background: #fff;
  border: none;
  border-radius: 2px;
  box-shadow: 0 8px 17px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
  padding: 19px;
  padding-bottom: 30px;
  margin-bottom: 20px;
  min-height: 20px;
  overflow: hidden;
}

.logo {
  display: block;
  margin: 0 auto;
  width: 250px;
  max-width: 100%;
}

#mainContainer {
  margin-top: 0;
}

/* ============================================
   VIEW SECTIONS
   ============================================ */
.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: fadeIn 0.35s ease;
}

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

/* ============================================
   TITLE HEADER
   ============================================ */
.title_header {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 300;
  font-size: 24px;
  color: #000;
  text-align: center;
  margin: 20px 0 10px;
}

/* ============================================
   FORM CONTROLS
   ============================================ */
.form-group {
  margin: 5px 0 0 !important;
}

.date-picker,
.input-text {
  background-color: #eee !important;
  border: 1px solid #ccc;
  height: 40px;
  font-size: 16px;
  color: #555;
}

.date-picker:focus,
.input-text:focus {
  border-color: #611232;
  box-shadow: 0 0 0 2px rgba(97,18,50,0.15);
}

.input2 {
  background-color: #eee !important;
  border: 1px solid #ccc;
  height: 40px;
  font-size: 16px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-continuar {
  border: 3px solid #fff;
  background-color: #611232 !important;
  color: #fff !important;
  width: 100%;
  border-radius: 8px;
  padding: 20px 30px;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 10px 1px;
  transition: opacity 0.3s, background 0.3s;
  cursor: pointer;
}

.btn-continuar:hover:not(:disabled) {
  background-color: #7a1840 !important;
}

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

.btn-continuar2 {
  background-color: #611232 !important;
  color: #fff !important;
  width: 100%;
  border-radius: 8px;
  border: none;
  padding: 8px 30px;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 10px 1px;
  transition: opacity 0.3s;
  cursor: pointer;
}

.btn-continuar2:hover {
  background-color: #7a1840 !important;
}

.btn-generic {
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 14px;
  margin: 10px 0;
}

/* ============================================
   CURP DATA DISPLAY
   ============================================ */
.curp-data-row {
  border: 2px solid #611232;
  margin: 10px 0;
  padding: 5px 0;
}

.curp-data-row p {
  font-size: 14px;
  margin: 5px 0 10px;
  color: #333;
}

.curp-data-row b {
  font-size: 13px;
  color: #000;
}

/* ============================================
   CALENDAR
   ============================================ */
.calendar-wrapper {
  margin: 10px 0;
}

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

.calendar-header h3 {
  font-weight: bold;
  font-size: 20px;
  margin: 0 20px;
  min-width: 180px;
  text-align: center;
}

.btn-cal-nav {
  background: none;
  border: none;
  color: #3498db;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 10px;
  text-transform: uppercase;
}

.btn-cal-nav:disabled {
  color: #ccc;
  cursor: not-allowed;
}

.btn-cal-nav:hover:not(:disabled) {
  color: #2980b9;
}

.calendar-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.calendar-table th {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  padding: 10px 4px;
  background: #f9f9f9;
  border: 1px solid #ddd;
}

.calendar-table td {
  text-align: center;
  padding: 14px 6px;
  font-size: 15px;
  border: 1px solid #ddd;
  height: 52px;
  vertical-align: middle;
}

.calendar-table td.disponible {
  background: #e8f4ff;
  color: #036;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  border: 1px solid #CCE5FF;
}

.calendar-table td.disponible:hover {
  background: #2980b9 !important;
  color: #fff;
}

.calendar-table td.no-disponible {
  background: #f5f5f5;
  color: #b0b0b0 !important;
  font-weight: 700;
  border: 1px solid #E0E0E0;
  cursor: not-allowed;
}

.calendar-table td.day-selected {
  background: #3498db !important;
  color: #fff !important;
  font-weight: 700;
}

.calendar-table td.empty-day {
  background: #f5f5f5;
  color: #ccc;
}

.calendar-legend {
  display: flex;
  gap: 20px;
  margin-top: 8px;
  font-size: 12px;
  color: #666;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 2px;
}

.legend-dot.disponible-dot {
  background: #e8f4ff;
  border: 1px solid #CCE5FF;
}

.legend-dot.no-disponible-dot {
  background: #f5f5f5;
  border: 1px solid #E0E0E0;
}

/* ============================================
   VIGENCIA CARDS
   ============================================ */
.vigencia-card {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
  margin: 8px 0;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.vigencia-card:hover {
  border-color: #611232;
}

.vigencia-card.selected {
  border-color: #611232;
  box-shadow: 0 0 0 2px rgba(97,18,50,0.2);
  background: #fdf2f5;
}

.vigencia-card.disabled-card {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.vigencia-card input[type="radio"] {
  margin: 0;
  flex-shrink: 0;
}

/* ============================================
   PANELS (Bootstrap overrides for resumen)
   ============================================ */
.panel {
  margin-bottom: 15px;
  border-radius: 4px;
}

.panel-primary > .panel-heading {
  background-color: #337ab7;
  border-color: #337ab7;
  color: #fff;
}

.panel-info > .panel-heading {
  background-color: #5bc0de;
  border-color: #5bc0de;
  color: #fff;
}

.panel-warning > .panel-heading {
  background-color: #f0ad4e;
  border-color: #f0ad4e;
  color: #fff;
}

.panel-title {
  font-size: 16px;
  font-weight: 500;
}

.panel-body p {
  margin-bottom: 8px;
  line-height: 1.6;
}

.panel-body ol {
  padding-left: 20px;
}

.panel-body ol li {
  margin-bottom: 5px;
  line-height: 1.5;
}

/* ============================================
   LINK MAPS
   ============================================ */
.link-maps {
  color: #3F51B5;
  text-decoration: none;
  cursor: pointer;
}

.link-maps:hover {
  text-decoration: underline;
}

.link-maps img {
  vertical-align: middle;
  margin-right: 3px;
}

/* ============================================
   WELL PAGO (inside mainContainer)
   ============================================ */
.well-pago {
  background-color: #f5f5f5;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  box-shadow: rgba(0,0,0,0.05) 0px 1px 1px inset;
  padding: 19px;
  margin-bottom: 20px;
  overflow: hidden;
}

/* ============================================
   PAYMENT METHOD
   ============================================ */
.payment-method {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 10px 0;
}

.payment-method .method {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 235px;
  height: 122px;
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 20px 0 0;
  margin: 0 11px 5px 0;
  background: #ecf0f1;
  cursor: pointer;
  transition: border-color 0.2s;
}

.payment-method .method:hover {
  border-color: #6eb2fb;
}

.payment-method .method.blue-border {
  border-color: #6eb2fb;
}

.payment-method .method img {
  height: auto;
  width: 113px;
  max-width: 113px;
}

.payment-method .method.pago-tarjeta img {
  height: 32px;
  width: auto;
  max-width: none;
}

.payment-method .method .radio-input {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 300;
  margin-top: 8px;
}

.link-forma-pago {
  color: #3F51B5;
  cursor: pointer;
  font-weight: 300;
  font-size: 14px;
  display: inline;
  text-align: center;
}

.link-forma-pago:hover {
  text-decoration: underline;
}

/* ============================================
   PAYMENT INFO
   ============================================ */
.info-container {
  margin-top: 10px;
}

.info-container .label-primary {
  font-size: 16px;
  padding: 8px 15px;
  display: inline-block;
  margin: 10px 0;
}

.info-container .total {
  margin-top: 15px;
  padding: 10px 0;
}

.info-container .total b {
  display: block;
  margin-bottom: 8px;
}

.color-grey {
  color: #777 !important;
}

/* ============================================
   TIMER
   ============================================ */
.timer-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 14px 0;
  border-radius: 4px;
  background: #611232;
  color: #fff;
}

.timer-strip .glyphicon {
  font-size: 20px;
}

.timer-strip-text {
  font-size: 13px;
  flex: 1;
}

.timer-strip-digits {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  font-family: 'Courier New', monospace;
}

/* ============================================
   PAGOS FORM CONTAINER
   ============================================ */
.pagos-container {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

/* (Card payment styles moved to pago.html) */

/* ============================================
   COLOR GREEN (éxito)
   ============================================ */
.color-green {
  color: #2e7d32;
  text-align: center;
  margin: 30px 0;
  line-height: 1.8;
}

/* ============================================
   CONFIRMATION TABLE (old, keep for compat)
   ============================================ */
.confirm-table-wrap {
  margin: 15px 0;
}

.confirm-table {
  width: 100%;
}

.confirm-table td {
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #ddd;
}

.confirm-table td:first-child {
  width: 40%;
  background: #f9f9f9;
}

/* ============================================
   LOADER
   ============================================ */
.loader_wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  nav.navbar {
    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 10px;
  }

  .well.page {
    padding: 15px 15px 30px;
  }

  .vigencia-card {
    font-size: 12px;
    padding: 10px;
  }

  .calendar-table th {
    font-size: 11px;
  }

  .calendar-table td {
    padding: 10px 3px;
    font-size: 13px;
    height: 44px;
  }

  .btn-continuar {
    padding: 15px 20px;
  }

  .payment-method .method {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .calendar-header h3 {
    font-size: 15px;
    min-width: 100px;
  }

  .col-xs-6 {
    width: 100%;
  }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  body { background: #fff; }
  .main-container { padding-top: 0; }
  nav.navbar { display: none !important; }
  .btn-continuar, .btn-continuar2 { display: none !important; }
  .well.page { box-shadow: none; }
}
