:root {
  --primary: #e91e63;
  --secondary: #1976d2;
  --bg: #f4f6f8;
  --text: #333;
}

* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

/* Header */
.app-header {
  background: linear-gradient(135deg, #e91e63, #ff6090);
  color: #fff;
  text-align: center;
  padding-bottom: 8px;
}

.app-header h1 {
  margin: 0;
  font-size: 18px;
}

.app-header p {
  margin: 6px 0 0;
  font-size: 14px;
  opacity: 0.95;
}

.banner img {
  width: 100%;
}

/* Layout */
.container {
  max-width: 420px;
  margin: auto;
  padding: 12px;
}

/* Cards */
.info-card,
.search-card,
.results-header,
.voter-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.info-card {
  padding: 14px 14px 2px;
}

.info-card h3 {
  margin-top: 0;
  font-size: 16px;
}

.info-card ol {
  padding-left: 18px;
  font-size: 14px;
}

.hint {
  font-size: 13px;
  color: #555;
}

/* Search form */
.search-card {
  display: flex;
  gap: 8px;
  flex-direction: column;
}
.form-group {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}
.form-group label {
    width: 100px;
    font-weight: 600;
}

.search-card input {
  flex: 1;
  padding: 6px 10px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
}
.form-group input {
    flex-grow: 10;
}

.search-card button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 15px;
}

.form-action {
    text-align: center;
}

.input-group {
    border: 1px solid #fb5588;
    border-radius: 5px;
    padding: 8px 5px 2px;
}

.or-ceperate {
    text-align: center;
    font-weight: 700;
}

/* Results */
.results-header {
  background: var(--primary);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.results-header button {
  background: #fff;
  color: var(--primary);
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-weight: bold;
}

/* Voter Card */
.voter-card p {
  margin: 0.8rem 0;
  font-size: 14px;
}
.voter-card .card-head {
  font-size: 16px;
  font-weight: 700;
  color: #e91e63;
}

.voter-name {
  font-size: 18px !important;
  font-weight: 600;
}

.voterid {
  font-weight: 700;
  font-size: 1rem;
  color: #e91e63;
}

/* Share Buttons */
.share-buttons {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.share-buttons a {
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.share-buttons svg {
  vertical-align: bottom;
}

.whatsapp {
  background: #25d366;
}

.sms {
  background: var(--secondary);
}

/* Loading */
.loading {
  text-align: center;
  padding: 10px;
  font-size: 14px;
}

/* Footer */
.footer {
  text-align: center;
  font-size: 12px;
  padding: 12px;
  color: #777;
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
}

/* Popup */
.popup {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  z-index: 1001;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

/* Header */
.popup-header {
  background: #e91e63;
  color: #fff;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.popup-header h3 {
  margin: 0;
  font-size: 16px;
}

.popup-header span {
  font-size: 22px;
  cursor: pointer;
}

/* Body */
.popup-body {
  padding: 14px;
}

.note-box {
  background: #f9f9f9;
  border-left: 4px solid #e91e63;
  padding: 10px;
  margin-bottom: 12px;
  font-size: 14px;
}

input[type="tel"] {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.small-note {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
}

.note-box p {
    line-height: 1;
    margin: 0.5rem 0;
}

/* Footer */
.popup-footer {
  padding: 12px;
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.btn {
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  color: #fff;
  cursor: pointer;
}

.whatsapp {
  background: #25d366;
}

.sms {
  background: #1976d2;
}

.close {
  background: #9e9e9e;
}

/* Desktop center popup */
@media (min-width: 600px) {
  .popup {
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    border-radius: 16px;
  }
}

/* Responsive */
@media (min-width: 768px) {
  .container {
    max-width: 520px;
  }
}

@media (max-width: 767px) {
  .share-buttons a {
      display: block;
      flex: none;
  }

  .share-buttons a:nth-child(1) {
  margin-bottom: 16px;   
  }

  .share-buttons {
      display: block;
  }
  
  .popup {
    width: 98%;
    bottom: auto;
    top: 10%;
  }
}
