@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'El Messiri', sans-serif;
    background: #F0F2F8;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(102, 126, 234, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(118, 75, 162, 0.06) 0%, transparent 50%);
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* ─── Main Container ─── */
.container {
    width: 100%;
    max-width: 560px;
    background: #FFFFFF;
    box-shadow:
        0px 187px 75px rgba(0, 0, 0, 0.01),
        0px 105px 63px rgba(0, 0, 0, 0.04),
        0px 47px 47px rgba(0, 0, 0, 0.07),
        0px 12px 26px rgba(0, 0, 0, 0.08),
        0px 0px 0px rgba(0, 0, 0, 0.08);
    border-radius: 26px;
    padding: 36px 32px 32px;
    margin: 0 auto;
}

/* ─── Header ─── */
h1 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.subtitle {
    text-align: center;
    font-size: 0.875rem;
    color: #1a1a1a;
    font-weight: 500;
    margin-bottom: 28px;
}

/* ─── Step Indicators ─── */
.step-indicators {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 32px;
}

.step-indicator {
    text-align: center;
    padding: 8px 6px;
    background: #F2F2F2;
    color: #8B8E98;
    border-radius: 18px;
    font-size: 0.72rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.15, 0.83, 0.66, 1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.step-indicator.active {
    background: #000000;
    color: #ffffff;
    
}

/* ─── Steps ─── */
.step {
    display: none;
    animation: fadeSlide 0.3s ease;
}

.step.active {
    display: block;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Form Groups ─── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 16px;
}

label {
    font-size: 10px;
    color: #8B8E98;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: block;
}

/* ─── Inputs ─── */
select,
input[type="text"],
input[type="url"],
input[type="tel"],
textarea {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border-radius: 11px;
    outline: none;
    background-color: #F2F2F2;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-family: 'El Messiri', sans-serif;
    color: #1a1a2e;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.15, 0.83, 0.66, 1);
}

textarea {
    height: auto;
    padding: 12px 16px;
    resize: vertical;
    line-height: 1.6;
}

select:focus,
input[type="text"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
textarea:focus {
    border: 1px solid transparent;
    box-shadow: 0px 0px 0px 2px #242424;
    background-color: transparent;
}

input::placeholder,
textarea::placeholder {
    color: #c0c0c8;
    font-weight: 400;
}

#step3 .form-group + .form-group {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

#domain {
    background-color: #1a1a1a;
    color: #ffffff;
}

#domain::placeholder {
    color: #666;
}

#domain:focus {
    background-color: #000000;
}

.skeleton-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    color: transparent;
    border-color: #e0e0e0 !important;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Buttons ─── */
button {
    width: 100%;
    height: 50px;
    border-radius: 11px;
    border: 0;
    outline: none;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'El Messiri', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.15, 0.83, 0.66, 1);
}

/* Primary black button */
#fetchDataBtn {
    
    color: #ffffff;
    background: linear-gradient(180deg, #363636 0%, #1B1B1B 50%, #000000 100%);
    box-shadow: 0px 0px 0px 0px #FFFFFF, 0px 0px 0px 0px #000000;
    width: auto;
    min-width: 180px;
    padding: 0 32px;
    display: block;
    margin: 0 auto;
    border-radius: 30px;
}

#nextBtn {
    color: #ffffff;
    background: linear-gradient(180deg, #363636 0%, #1B1B1B 50%, #000000 100%);
    box-shadow: 0px 0px 0px 0px #FFFFFF, 0px 0px 0px 0px #000000;
    width: auto;
    min-width: 140px;
    padding: 0 32px;
}



button:disabled {
    background: #F2F2F2;
    color: #8B8E98;
    cursor: not-allowed;
    box-shadow: none;
}

/* ─── "Or" Separator ─── */
.separator-or {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    color: #8B8E98;
    font-size: 11px;
    font-weight: 600;
    margin: 14px 0;
}

.separator-or .line {
    height: 1px;
    background: #e8e8e8;
    border: none;
}

/* ─── Status Messages ─── */
.status {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 11px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.status.error {
    background: #FFF0F0;
    color: #c53030;
}

.status.success {
    background: #F0FFF4;
    color: #22543d;
}

/* ─── Template Grid ─── */
.template-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.template-card {
    border: 2px solid #F2F2F2;
    border-radius: 14px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.15, 0.83, 0.66, 1);
    background: #FAFAFA;
}

.template-card:hover {
    border-color: #d0d0d0;
    background: #F5F5F5;
}

.template-card.selected {
    border-color: #1a1a2e;
    background: #F8F8FF;
    
}

.template-card img {
    width: 100%;
    height: 110px;
    border-radius: 8px;
    background: #e8e8e8;
}

.template-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.template-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 1100px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.template-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 15px;
    direction: rtl;
}

.template-modal-close {
    min-width: 44px;
    min-height: 44px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #2d3748;
    flex-shrink: 0;
}

.template-modal-close:hover {
    background: #f7fafc;
    color: #2d3748;
}

#templateModalFrame {
    flex: 1;
    width: 100%;
    border: none;
}

@media (max-width: 640px) {
    .template-modal-overlay {
        padding: 16px;
        align-items: center;
    }
    .template-modal-content {
        border-radius: 12px;
        height: 85vh;
        width: 100%;
    }
}

.preview-btn {
    margin-top: 8px;
    width: 100%;
    height: 32px;
    padding: 0;
    font-size: 0.78rem;
    font-weight: 600;
    background: #F2F2F2;
    color: #1a1a2e;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.preview-btn:hover {
    background: #e0e0e0;
}

/* ─── Plan Cards ─── */
.plan-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 6px;
}

.plan-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 10px;
    border: 2px solid #F2F2F2;
    border-radius: 14px;
    cursor: pointer;
    background: #FAFAFA;
    transition: all 0.3s cubic-bezier(0.15, 0.83, 0.66, 1);
    gap: 4px;
}

#planSection {
    animation: fadeSlide 0.4s ease;
}

.plan-card input[type="radio"] {
    display: none;
}

.plan-card strong {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a1a2e;
}

.plan-card div {
    font-size: 0.88rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-top: 2px;
}

.plan-card small {
    font-size: 0.68rem;
    color: #8B8E98;
    font-weight: 500;
    line-height: 1.3;
}

.plan-card small.savings {
    display: inline-block;
    color: #15803d;
    background: #dcfce7;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-top: 4px;
}



.plan-card:has(input:checked) {
    border-color: #1a1a2e;
    background: #F8F8FF;
}

.plan-card:has(input:checked) strong,
.plan-card:has(input:checked) div {
    color: #000000;
}

/* ─── Domain Check ─── */
.domain-check {
    margin-top: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

.domain-available {
    color: #38a169;
}

.domain-unavailable {
    color: #e53e3e;
}

/* ─── Checkbox ─── */
.address-type {
    margin-bottom: 14px;
}

.address-type label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a4a5a;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}

.address-type input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1a1a2e;
    border-radius: 5px;
    flex-shrink: 0;
}

/* ─── Step 2 heading ─── */
.step h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 16px;
}

/* ─── Nav Buttons ─── */
.nav-buttons {
   display: flex;
    gap: 10px;
    margin-top: 24px;
    justify-content: space-between;
}


.nav-buttons button {
    flex: 0 0 auto;
}

#prevBtn {
    width: 110px;
}

#nextBtn {
    margin-right: auto;
}

/* ─── PayPal container ─── */
#paypal-button-container {
    margin-top: 16px;
}

/* ─── Fetch status ─── */
#fetchStatus {
    margin-top: 12px;
}

/* ─── Step 1 spacing ─── */
#step1 button + button {
    margin-top: 0;
}

#step1 .form-group {
    margin-bottom: 20px;
}


@media (max-width: 480px) {
  body {
    padding: 12px 10px;
  }

  .container {
    padding: 20px 16px 20px;
    border-radius: 14px;
    max-width: 100%;
  }

  .step-indicators {
    font-size: 0.62rem;
    gap: 4px;
  }

  .step-indicator {
    padding: 6px 4px;
  }

  .plan-options {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .plan-card {
    flex-direction: row;
    justify-content: space-between;
    padding: 12px 14px;
  }

  .template-options {
    grid-template-columns: repeat(2, 1fr);
  }
}