/*
Theme Name: Textwa.link
Author: Ashok
Version: 1.5
*/

  :root {
      --font-primary: 'Roboto', sans-serif;
  --font-mono: 'Roboto', sans-serif;

    --bg: #0d0d0d;
    --surface: #141414;
    --card: #1a1a1a;
    --border: #2a2a2a;
    --green: #25D366;
    --green-dim: #1da851;
    --green-glow: rgba(37,211,102,0.15);
    --text: #f0f0f0;
    --muted: #777;
    --accent: #25D366;
  }

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

  body {
    background: var(--bg);
    color: var(--text);
   font-family: var(--font-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
  }

  .header-text p,
.field label,
.country-select,
input,
textarea,
.char-count,
.result-label,
.result-url,
.footer {
  font-family: var(--font-mono);
}

.header-text h1,
.btn-generate,
.btn-action {
  font-family: var(--font-primary);
}

  /* Decorative background */
  body::before {
    content: '';
    position: fixed;
    top: -200px; right: -200px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(37,211,102,0.07) 0%, transparent 70%);
    pointer-events: none;
  }
  body::after {
    content: '';
    position: fixed;
    bottom: -200px; left: -200px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(37,211,102,0.05) 0%, transparent 70%);
    pointer-events: none;
  }

  .container {
    width: 100%;
    max-width: 560px;
  }

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

  /* Header */
  .header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 2.5rem;
  }

  .wa-icon {
    width: 48px; height: 48px;
    background: var(--green);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 24px var(--green-glow);
  }

  .wa-icon svg { width: 26px; height: 26px; }

  .header-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
  }
  .header-text p {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 2px;
  }

  /* Card */
  .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
  }

  .field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.5rem;
  }

  .phone-row {
    display: flex;
    gap: 10px;
  }

  .country-select {
    width: 110px;
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.82rem;
    padding: 0 10px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23777'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
  }
  .country-select:focus { border-color: var(--green); }

  input[type="tel"], input[type="text"], textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: none;
  }
  input[type="tel"]:focus, input[type="text"]:focus, textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-glow);
  }
  textarea { height: 90px; line-height: 1.5; }

  ::placeholder { color: #444; }

  .char-count {
    text-align: right;
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 4px;
  }

  .btn-generate {
    background: var(--green);
    color: #000;
    border: none;
    border-radius: 12px;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 20px rgba(37,211,102,0.2);
  }
  .btn-generate:hover { background: #20c05a; box-shadow: 0 4px 28px rgba(37,211,102,0.35); }
  .btn-generate:active { transform: scale(0.98); }

  /* Result */
  .result {
    display: none;
    flex-direction: column;
    gap: 10px;
    animation: fadeUp 0.4s ease both;
  }
  .result.show { display: flex; }

  .result-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .result-url {
    background: var(--surface);
    border: 1px solid var(--green);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-size: 0.78rem;
    color: var(--green);
    word-break: break-all;
    line-height: 1.5;
  }

  .result-actions {
    display: flex;
    gap: 10px;
  }

  .btn-action {
    flex: 1;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
  }

  .btn-copy {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
  }
  .btn-copy:hover { border-color: var(--green); color: var(--green); }
  .btn-copy.copied { border-color: var(--green); color: var(--green); background: var(--green-glow); }

  .btn-open {
    background: var(--green);
    color: #000;
    box-shadow: 0 2px 12px rgba(37,211,102,0.2);
  }
  .btn-open:hover { background: #20c05a; }

  /* Error */
  .error {
    font-size: 0.78rem;
    color: #ff6b6b;
    display: none;
  }
  .error.show { display: block; }

  /* Divider */
  .divider {
    border: none;
    border-top: 1px solid var(--border);
  }

  .footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 1rem;
    color: #fff;
  }

  .iti{
    width: 100%;
  }

  /* Main input */
.iti input {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

/* Focus state */
.iti input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
  outline: none;
}

/* Country dropdown container */
.iti__country-list {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* Each country item */
.iti__country {
  padding: 10px;
  transition: background 0.2s;
}

/* Hover + highlight */
.iti__country:hover,
.iti__highlight {
  background: rgba(37,211,102,0.1);
}

/* Country name + dial code */
.iti__country-name,
.iti__dial-code {
  color: var(--text);
}

/* Dial code muted */
.iti__dial-code {
  color: var(--muted);
}

/* Selected flag area */
.iti__selected-flag {
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-radius: 10px 0 0 10px;
}

/* Arrow */
.iti__arrow {
  border-top-color: var(--muted);
}

/* Search input (if enabled) */
.iti__search-input {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Scrollbar (optional nice touch) */
.iti__country-list::-webkit-scrollbar {
  width: 6px;
}
.iti__country-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}