/* General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 20px;
}

/* 🔹 Updated Form Container */
.jyotish-form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.jyotish-form-container h3 {
    margin-bottom: 15px;
}

.jyotish-form-container form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jyotish-form-container label {
    font-weight: bold;
    text-align: left;
    display: block;
    margin-bottom: 5px;
}

.jyotish-form-container input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
}

.jyotish-form-container button {
    -webkit-touch-callout: none; /* Prevent callout to copy image, etc when tap to hold */
    -webkit-appearance: none;
    appearance: none;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}


/* 🔹 Updated Result Container */
.jyotish-results-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background: white;
}

.jyotish-results-container h3 {
    padding: 10px;

}

/* 🔹 Updated Table Styles */
.jyotish-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
}

.jyotish-table th, 
.jyotish-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.jyotish-table th {
    font-weight: bold;
    text-align: center;
}

.jyotish-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.jyotish-table tr:hover {
    background-color: #e6f7ff;
}

/* 🔹 Location Autocomplete Styling */
.location-autocomplete-container {
    position: relative;
    width: 100%;
}

.location-suggestions {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    z-index: 1000;
    list-style-type: none;
    padding: 0;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.location-suggestions li {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.location-suggestions li:hover {
    background-color: #f0f0f0;
}

.nominatim-attribution {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
    text-align: right;
}

.nominatim-attribution a {
    color: #0073aa;
    text-decoration: none;
}

.nominatim-attribution a:hover {
    text-decoration: underline;
}

/* 🔹 Planetary Icon Styling */
.planet-icon {
    font-size: 18px;
    margin-right: 5px;
}

/* 🔹 Mobile Responsive */
@media (max-width: 600px) {
    .jyotish-form-container {
        width: 95%;
    }

    .jyotish-results-container {
        width: 100%;
    }

    .jyotish-table th, 
    .jyotish-table td {
        padding: 8px;
        font-size: 14px;
    }
}

/* Additional iOS-specific media query for smaller devices */
@media screen and (max-width: 375px) {
    .jyotish-form-container input,
    .jyotish-form-container button {
        font-size: 14px;
        padding: 5px;
    }
}

/* iOS Safari specific adjustments */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific styles */
    input[type="date"],
    input[type="time"] {
        -webkit-appearance: none;
        appearance: none;
        min-height: 44px; /* Better touch target size */
    }
}

svg {
    width: 100%;
    max-width: 400px;
    height: auto;
  }

/* 📌 Ensure the container is relative for absolute positioning */
.jyotish-form-container {
    position: relative;
}

/* 📌 Ensure the form container has relative positioning */
.jyotish-form-container {
    position: relative;
}

/* 📌 Ensure the input field is correctly positioned */
#location {
    width: 100%;
    box-sizing: border-box; /* Ensures padding doesn't affect width */
}

/* Location Field Wrapper - Container for input and suggestions */
.jyotish-form-container .location-field-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.jyotish-form-container .location-field-wrapper input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

/* Common styles for both class and ID based suggestion lists */
.jyotish-form-container .location-suggestions,
#location-suggestions {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-top: 2px;
    padding: 0;
    list-style-type: none;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    top: 100%;
    left: 0;
}

/* Common styles for suggestion items */
.jyotish-form-container .location-suggestions li,
#location-suggestions li {
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
    text-align: left;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    touch-action: manipulation;
}

.jyotish-form-container .location-suggestions li:hover,
.jyotish-form-container .location-suggestions li:focus,
#location-suggestions li:hover,
#location-suggestions li:focus {
    background: #f1f1f1;
}

/* Hide empty suggestion lists */
.jyotish-form-container .location-suggestions:empty,
#location-suggestions:empty {
    display: none;
}

/* Ensure proper positioning for location input container */
.jyotish-form-container label[for$="location"] {
    position: relative;
    display: block;
    width: 100%;
}


/* Kundali Milan Compatibility Meter Styles */
.compatibility-meter {
    margin: 20px 0;
    text-align: center;
}

.meter-label {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.meter-container {
    height: 24px;
    background-color: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.meter-fill {
    height: 100%;
    border-radius: 12px;
    -webkit-transition: width 1s ease-in-out, background-color 1s ease-in-out;
    transition: width 1s ease-in-out, background-color 1s ease-in-out;
}

/* Compatibility Summary Styles */
.compatibility-summary {
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.compatibility-summary h4 {
    margin-top: 0;
    color: #333;
}

.compatibility-summary p {
    margin: 10px 0;
}

.compatibility-level {
    font-size: 22px;
    margin: 15px 0;
}

/* Kundali Milan Form Specific Styles */
#kundali-milan-form h4 {
    margin-top: 20px;
    padding: 8px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

/* Kundali Milan Results Styles */
.milan-explanation {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #673AB7;
}

.milan-explanation ul {
    margin-left: 20px;
}

.compatibility-recommendation {
    background-color: #EDE7F6;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #9C27B0;
}

.compatibility-recommendation h4 {
    margin-top: 0;
    color: #6A1B9A;
}

/* Location Suggestions - Global Styles */
.jyotish-form-container .location-suggestions {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-top: 2px;
    padding: 0;
    list-style-type: none;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    top: 100%;
    left: 0;
}

/* Styles for #location-suggestions */
#location-suggestions {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-top: 2px;
    padding: 0;
    list-style-type: none;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    top: 100%;
    left: 0;
}

#location-suggestions li {
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    -webkit-transition: background 0.2s ease-in-out;
    transition: background 0.2s ease-in-out;
    text-align: left;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    touch-action: manipulation;
}

#location-suggestions li:hover,
#location-suggestions li:focus {
    background: #f1f1f1;
}

/* Styles for .location-suggestions */
.jyotish-form-container .location-suggestions li {
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    -webkit-transition: background 0.2s ease-in-out;
    transition: background 0.2s ease-in-out;
    text-align: left;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    touch-action: manipulation;
}

.jyotish-form-container .location-suggestions li:hover,
.jyotish-form-container .location-suggestions li:focus {
    background: #f1f1f1;
}

/* Rudraksha Cards */
.rudraksha-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.rudraksha-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.rudraksha-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #fafafa;
}

.rudraksha-content {
    padding: 14px;
}

.rudraksha-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rudraksha-title {
    margin: 0;
    font-size: 18px;
}

.jyotish-chart-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 20px;
}

.jyotish-chart-title {
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    letter-spacing: 0.3px;
}

.jyotish-chart-title-icon {
    font-size: 18px;
}

.jyotish-chart-wrap {
    max-width: 430px;
    margin: 0 auto;
    padding: 8px;
}

.jyotish-north-indian-svg {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.rudraksha-badge {
    background: #eef2ff;
    color: #374151;
    border: 1px solid #c7d2fe;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
}

.rudraksha-sub {
    color: #4b5563;
    margin: 8px 0 4px;
}

.rudraksha-desc, .rudraksha-reason, .rudraksha-delivery {
    margin: 6px 0;
    color: #374151;
}

.rudraksha-cta {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.rudraksha-cta .btn-enquire,
.rudraksha-cta .btn-buy {
    flex: 1;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.rudraksha-cta .btn-enquire { background: #2563eb; color: #fff; }
.rudraksha-cta .btn-enquire:hover { background: #1d4ed8; }
.rudraksha-cta .btn-buy { background: #f59e0b; color: #111827; }
.rudraksha-cta .btn-buy:hover { background: #d97706; }

.rudraksha-enquiry {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
}

.rudraksha-enquiry-form {
    display: grid;
    gap: 8px;
}

.rudraksha-enquiry-form input,
.rudraksha-enquiry-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.rudraksha-enquiry-form button {
    background: #10b981;
    color: #fff;
    padding: 10px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}
.rudraksha-enquiry-form button:hover { background: #059669; }

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

/* Rudraksha focus chips */
.rudraksha-focus {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0 16px;
}
.rudraksha-focus .focus-label {
    font-weight: 600;
    margin-right: 4px;
}
.focus-chip {
    border: 1px solid #d0d7de;
    background: #fff;
    color: #24292f;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.2;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.focus-chip:hover {
    border-color: #9aa3ab;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.focus-chip.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}
