/* Egurukul Listing - Digital Business Card Mobile First CSS */

/* Container for Single Listing */
body.hp-template--listing-view-page {
    background: #eef2f5;
}
.hp-template--listing-view-page .hp-page__content {
    max-width: 480px; /* Mobile app width */
    margin: 20px auto;
    background: #ffffff;
    padding-bottom: 90px; /* Space for floating buttons */
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    min-height: calc(100vh - 40px);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
}

/* Header / Cover Image */
.hp-template--listing-view-page .hp-listing__image {
    border-radius: 0 0 30px 30px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Floating Action Buttons (FAB) Container */
.el-fab-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 9999;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.4);
}

/* Individual FAB Buttons */
.el-fab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #555;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease;
}
.el-fab-item:hover, .el-fab-item:active {
    transform: translateY(-3px);
}

.el-fab-item span.dashicons {
    font-size: 24px;
    margin-bottom: 4px;
    width: 24px;
    height: 24px;
}

.el-fab-wa { color: #25D366; }
.el-fab-call { color: #007BFF; }
.el-fab-save { color: #FF9800; }
.el-fab-qr { color: #673AB7; }
.el-fab-upi { color: #E91E63; }

/* Styling for specific HivePress elements to look like a card */
.hp-template--listing-view-page .hp-listing__title {
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    margin-top: 25px;
    color: #222;
}

.hp-template--listing-view-page .hp-listing__categories {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    height: auto !important;
    white-space: normal !important;
}

/* Card blocks styling */
.hp-template--listing-view-page .hp-block {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin: 15px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
    transition: box-shadow 0.3s ease;
}
.hp-template--listing-view-page .hp-block:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

/* Modal CSS */
.el-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.el-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 350px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.el-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

/* Ultra Premium Form Styling (Stripe / Apple Inspired) */
body.hp-template--listing-submit-page {
    background-color: #f3f4f6;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.hp-form {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.03);
    border: 1px solid rgba(255,255,255,0.8);
    max-width: 700px;
    margin: 40px auto;
    position: relative;
    overflow: hidden;
}

/* Subtle top glow line for the form */
.hp-form::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: var(--e-global-color-primary, var(--hp-primary-color, #007bff));
}

.hp-form .hp-field {
    margin-bottom: 28px;
    position: relative;
}

.hp-form label {
    font-size: 13px;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 10px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hp-form input[type="text"],
.hp-form input[type="url"],
.hp-form input[type="email"],
.hp-form input[type="password"],
.hp-form input[type="number"],
.hp-form textarea,
.hp-form select {
    width: 100%;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    background-color: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.hp-form input::placeholder,
.hp-form textarea::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.hp-form input:hover,
.hp-form textarea:hover,
.hp-form select:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.hp-form input:focus,
.hp-form textarea:focus,
.hp-form select:focus {
    outline: none;
    background-color: #ffffff;
    border-color: var(--e-global-color-primary, var(--hp-primary-color, #007bff));
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05), inset 0 2px 4px rgba(0,0,0,0.01);
}

.hp-form .hp-field__description {
    font-size: 13px;
    color: #6b7280;
    margin-top: 8px;
    display: block;
    line-height: 1.4;
}

.hp-form button[type="submit"] {
    background: var(--e-global-color-primary, var(--hp-primary-color, #007bff));
    color: #fff;
    border: none;
    padding: 18px 30px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 100px; /* Pill shape */
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.hp-form button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    filter: brightness(0.9);
}

.hp-form button[type="submit"]:active {
    transform: translateY(1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   PREMIUM HIVEPRESS LISTINGS UI (Archive Page)
   ========================================================================== */

/* 1. Listing Cards Layout & Hover Effects */
.hp-grid__item .hp-listing {
    background: #ffffff !important;
    border-radius: 16px !important;
    border: 1px solid #f1f5f9 !important;
    box-shadow: 0 4px 15px -3px rgba(0,0,0,0.03) !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease !important;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hp-grid__item .hp-listing:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1) !important;
    border-color: #e2e8f0 !important;
    z-index: 10;
}

/* 2. Listing Images & Fallbacks */
.hp-listing__image {
    position: relative;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    height: 170px !important;
}
.hp-listing__image img {
    transition: transform 0.5s ease;
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
}
.hp-grid__item .hp-listing:hover .hp-listing__image img {
    transform: scale(1.05);
}

/* 3. Badges & Categories (Pill Shapes) */
.hp-listing__categories {
    margin-top: 10px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    height: auto !important;
    white-space: normal !important;
}
.hp-listing__categories a {
    display: inline-block;
    background: #eff6ff !important;
    color: #2563eb !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}
.hp-listing__categories a:hover {
    background: #2563eb !important;
    color: #ffffff !important;
}

/* 4. Details Container & Content Stacking Fixes */
.hp-listing__content {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    height: auto !important;
    max-height: none !important;
    min-height: auto !important;
    position: relative !important;
    overflow: visible !important;
    padding: 15px !important; /* Ensure content has padding if it was missing */
}
.hp-listing__categories,
.hp-listing__title,
.hp-listing__details,
.hp-listing__attributes,
.hp-listing__details--primary {
    position: relative !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important; /* Strip all default margins */
    flex-shrink: 0 !important;
    width: 100% !important;
}
.hp-listing__details {
    flex-grow: 1;
    display: flex !important;
    flex-direction: column !important;
    clear: both !important;
}
.hp-listing__details--primary {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
}
.hp-listing__categories {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    white-space: normal !important;
    clear: both !important;
}
.hp-listing__attributes {
    clear: both !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}
.hp-listing__title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 8px !important;
    line-height: 1.4 !important;
    height: auto !important;
    max-height: none !important;
    white-space: normal !important;
}
.hp-listing__title a {
    color: inherit !important;
}
.hp-listing__attributes {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px dashed #e2e8f0;
}

/* 5. Sticky Filter Sidebar */
.hp-page__sidebar {
    position: sticky;
    top: 120px; /* Account for header */
    z-index: 99;
}
.hp-form--listing-search {
    background: #ffffff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
}
.hp-form--listing-search input, 
.hp-form--listing-search select {
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    padding: 12px 15px !important;
    background: #f8fafc !important;
}
.hp-form--listing-search input:focus, 
.hp-form--listing-search select:focus {
    background: #ffffff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1) !important;
}
.hp-form--listing-search button[type="submit"] {
    border-radius: 8px !important;
    font-weight: bold !important;
    letter-spacing: 0.5px;
}

/* 6. Mobile Optimizations */
@media (max-width: 768px) {
    .hp-page__sidebar {
        position: relative;
        top: 0;
        margin-bottom: 30px;
    }
    .hp-grid__item .hp-listing {
        border-radius: 12px !important;
    }
    .hp-listing__image {
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
    }
}

/* 7. Sidebar Symmetric Buttons */
.hp-listing__actions--primary {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
}
.hp-listing__actions--primary .button,
.hp-listing__actions--primary a.button,
.hp-listing__actions--primary button {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 14px 20px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

/* 8. Global Button Hover Shine Effect */
.button--primary,
.hp-form__button,
button[type="submit"],
.el-job-btn,
.el-job-action-wa,
.el-btn-primary,
.button {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.button--primary::before,
.hp-form__button::before,
button[type="submit"]::before,
.el-job-btn::before,
.el-job-action-wa::before,
.el-btn-primary::before,
.button::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.button--primary:hover::before,
.hp-form__button:hover::before,
button[type="submit"]:hover::before,
.el-job-btn:hover::before,
.el-job-action-wa:hover::before,
.el-btn-primary:hover::before,
.button:hover::before {
    left: 100%;
}
