/* Trivex Property Promotion — Luxury obsidian + gold theme */

.trivex-promo-wrapper {
    max-width: 780px;
    margin: 40px auto;
    padding: 40px 30px;
    background: linear-gradient(180deg, #0d0d0f 0%, #1a1a1f 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    color: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.trivex-promo-title {
    text-align: center;
    color: #d4af37;
    font-size: 28px;
    margin: 0 0 8px;
    letter-spacing: 0.5px;
}

.trivex-promo-subtitle {
    text-align: center;
    color: #a0a0a0;
    margin: 0 0 30px;
    font-size: 15px;
}

/* === Package buttons === */
.trivex-package-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin-bottom: 20px;
    padding: 10px 4px;
}

.trivex-package-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 32px 22px;
    background: linear-gradient(145deg, #e63946 0%, #c41e2a 50%, #8b0a14 100%);
    border: none;
    border-radius: 16px;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;

    /* The 3D depth — multi-layer shadow gives a lifted, glossy look */
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35) inset,           /* top highlight */
        0 -3px 8px rgba(0, 0, 0, 0.35) inset,              /* bottom inner shadow */
        0 12px 0 #5c0710,                                  /* solid base (the "block" depth) */
        0 14px 18px rgba(0, 0, 0, 0.45),                   /* soft cast shadow */
        0 22px 35px rgba(198, 30, 42, 0.25);               /* outer red glow */
}

/* Glossy highlight on top half */
.trivex-package-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 16px 16px 50% 50% / 16px 16px 30% 30%;
    pointer-events: none;
}

/* Subtle shimmer line */
.trivex-package-btn::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 14px;
    right: 14px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    pointer-events: none;
}

.trivex-package-btn:hover {
    transform: translateY(-4px);
    filter: brightness(1.08);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.4) inset,
        0 -3px 8px rgba(0, 0, 0, 0.35) inset,
        0 16px 0 #5c0710,
        0 20px 28px rgba(0, 0, 0, 0.5),
        0 28px 45px rgba(230, 57, 70, 0.4);
}

/* Pressed-in look on click / when active */
.trivex-package-btn:active,
.trivex-package-btn.active {
    transform: translateY(8px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.25) inset,
        0 -2px 6px rgba(0, 0, 0, 0.4) inset,
        0 4px 0 #5c0710,
        0 6px 10px rgba(0, 0, 0, 0.4),
        0 10px 20px rgba(230, 57, 70, 0.25);
}

.trivex-pkg-label {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.4px;
    margin-bottom: 14px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.trivex-pkg-price {
    font-size: 30px;
    font-weight: 800;
    color: #ffffff;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 18px rgba(255, 255, 255, 0.15);
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

/* === Form === */
.trivex-promo-form {
    margin-top: 30px;
}

.trivex-selected-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.trivex-selected-info span {
    color: #a0a0a0;
}

.trivex-selected-info strong {
    color: #d4af37;
}

.trivex-selected-price {
    color: #d4af37 !important;
    font-weight: 700;
    margin-left: auto;
    font-size: 18px;
}

.trivex-change-pkg {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #d4af37;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.trivex-change-pkg:hover {
    background: rgba(212, 175, 55, 0.15);
}

.trivex-form-row {
    margin-bottom: 18px;
}

.trivex-form-row label {
    display: block;
    margin-bottom: 6px;
    color: #d4af37;
    font-size: 14px;
    font-weight: 500;
}

.trivex-form-row input[type="text"],
.trivex-form-row input[type="tel"],
.trivex-form-row input[type="email"],
.trivex-form-row textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    color: #f5f5f5;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.trivex-form-row input:focus,
.trivex-form-row textarea:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(255, 255, 255, 0.06);
}

.trivex-form-row textarea {
    resize: vertical;
    min-height: 100px;
}

/* === Upload zone === */
.trivex-upload-zone {
    position: relative;
    border: 2px dashed rgba(212, 175, 55, 0.4);
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: all 0.2s;
}

.trivex-upload-zone:hover,
.trivex-upload-zone.dragging {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.05);
}

.trivex-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.trivex-upload-zone p {
    margin: 0 0 6px;
    color: #f5f5f5;
    font-size: 15px;
}

.trivex-upload-zone small {
    color: #888;
    font-size: 12px;
}

.trivex-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.trivex-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.trivex-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trivex-remove-img {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trivex-remove-img:hover {
    background: #d4af37;
    color: #0d0d0f;
}

.trivex-image-count {
    margin-top: 8px;
    color: #a0a0a0;
    font-size: 13px;
    text-align: right;
}

/* === Messages === */
.trivex-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
}

.trivex-message.error {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #ff6b7a;
}

.trivex-message.success {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.4);
    color: #5cd676;
}

/* === Submit === */
.trivex-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: #0d0d0f;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
}

.trivex-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.trivex-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================
   RESPONSIVE — Mobile-first refinements
   ========================================================== */

/* Tablet & smaller laptops */
@media (max-width: 768px) {
    .trivex-promo-wrapper {
        margin: 24px 14px;
        padding: 30px 22px;
    }
    .trivex-promo-title {
        font-size: 24px;
    }
    .trivex-package-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* Standard mobile phones */
@media (max-width: 600px) {
    .trivex-promo-wrapper {
        margin: 14px 10px;
        padding: 22px 16px;
        border-radius: 10px;
    }
    .trivex-promo-title {
        font-size: 22px;
    }
    .trivex-promo-subtitle {
        font-size: 13px;
        margin-bottom: 22px;
    }

    /* Stack package buttons in a single column for easier tapping */
    .trivex-package-buttons {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 8px 2px;
    }
    .trivex-package-btn {
        flex-direction: column;
        justify-content: center;
        padding: 26px 20px;
        min-height: 120px;
    }
    .trivex-pkg-label {
        margin-bottom: 10px;
        font-size: 16px;
    }
    .trivex-pkg-price {
        font-size: 26px;
    }

    /* Selected package banner stacks better on small screens */
    .trivex-selected-info {
        gap: 8px;
        padding: 10px 12px;
        font-size: 14px;
    }
    .trivex-selected-price {
        margin-left: 0;
        width: 100%;
        text-align: right;
    }
    .trivex-change-pkg {
        margin-left: auto;
        padding: 6px 14px;
        min-height: 36px;
    }

    /* CRITICAL: prevent iOS auto-zoom on input focus.
       iOS zooms in whenever a focused input has font-size < 16px. */
    .trivex-form-row input[type="text"],
    .trivex-form-row input[type="tel"],
    .trivex-form-row input[type="email"],
    .trivex-form-row textarea {
        font-size: 16px;
        padding: 12px 14px;
    }

    .trivex-upload-zone {
        padding: 24px 14px;
    }
    .trivex-upload-zone p {
        font-size: 14px;
    }

    /* Bigger thumbnails on mobile so they're easy to tap/remove */
    .trivex-preview {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .trivex-remove-img {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }

    .trivex-submit-btn {
        padding: 16px;
        font-size: 15px;
        min-height: 52px;
    }
}

/* Very small phones (iPhone SE, older Androids) */
@media (max-width: 380px) {
    .trivex-promo-wrapper {
        padding: 18px 14px;
    }
    .trivex-promo-title {
        font-size: 20px;
    }
    .trivex-package-btn {
        padding: 22px 16px;
        min-height: 110px;
    }
    .trivex-pkg-label {
        font-size: 15px;
    }
    .trivex-pkg-price {
        font-size: 24px;
    }
    .trivex-preview {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Landscape orientation on phones — keep wrapper compact */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
    .trivex-promo-wrapper {
        margin: 10px auto;
        padding: 20px;
    }
}
