/**
 * Modal de Compra de Propiedad - Estilos y Animaciones
 * Metro Life RP - Desarrollado por Mercurio & Melman
 * VERSIÓN RESPONSIVE MEJORADA
 */

/* =========================================
   PURCHASE MODAL - BASE
   ========================================= */
.purchase-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.purchase-modal.active {
    display: flex;
    animation: fadeInModal 0.3s ease;
}

.purchase-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.purchase-modal-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    background: linear-gradient(135deg, #0a1628 0%, #1a2744 100%);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 25px 60px -15px rgba(0, 0, 0, 0.9),
        0 0 60px rgba(16, 185, 129, 0.15);
    animation: slideUpPurchase 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.purchase-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.purchase-modal-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.purchase-modal-body {
    padding: 40px 30px 30px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar */
.purchase-modal-body::-webkit-scrollbar {
    width: 6px;
}

.purchase-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.purchase-modal-body::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.5);
    border-radius: 3px;
}

.purchase-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.7);
}

/* =========================================
   CONTENT HEADER
   ========================================= */
.purchase-content {
    width: 100%;
    animation: slideInPurchase 0.5s ease;
}

.purchase-header {
    text-align: center;
    margin-bottom: 20px;
}

.purchase-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    box-shadow:
        0 10px 30px rgba(16, 185, 129, 0.5),
        inset 0 -3px 10px rgba(0, 0, 0, 0.2);
    animation: floatIcon 3s ease-in-out infinite, pulseGlowProperty 2s infinite;
    position: relative;
}

.purchase-icon::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid #10b981;
    opacity: 0.5;
    animation: ringExpandProperty 2s infinite;
}

.purchase-title {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.purchase-subtitle {
    font-size: 13px;
    color: #94a3b8;
    letter-spacing: 0.3px;
}

.property-name-highlight {
    color: #10b981;
    font-weight: 700;
}

/* =========================================
   DISCORD BOX
   ========================================= */
.discord-purchase-box {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 12px;
    overflow: hidden;
    margin: 15px 0;
}

.discord-purchase-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.8px;
}

.discord-purchase-header i {
    font-size: 18px;
}

.discord-purchase-body {
    padding: 18px 16px;
}

.discord-purchase-body>p {
    color: #e2e8f0;
    font-size: 13px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.discord-purchase-body strong {
    color: #10b981;
    font-weight: 700;
}

/* =========================================
   STEPS LIST
   ========================================= */
.purchase-steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.purchase-steps-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.25);
    border-left: 3px solid #10b981;
    border-radius: 6px;
    transition: all 0.3s ease;
    animation: fadeInRight 0.4s ease backwards;
}

.purchase-steps-list li:nth-child(1) {
    animation-delay: 0.05s;
}

.purchase-steps-list li:nth-child(2) {
    animation-delay: 0.1s;
}

.purchase-steps-list li:nth-child(3) {
    animation-delay: 0.15s;
}

.purchase-steps-list li:nth-child(4) {
    animation-delay: 0.2s;
}

.purchase-steps-list li:hover {
    background: rgba(16, 185, 129, 0.1);
    transform: translateX(5px);
}

.step-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon i {
    color: #fff;
    font-size: 13px;
}

.step-content {
    flex: 1;
    min-width: 0;
}

.step-title {
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 2px;
}

.step-desc {
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.3;
}

/* =========================================
   PRICE REMINDER BOX
   ========================================= */
.price-reminder-box {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 15px;
    animation: priceBoxPulse 3s infinite;
}

.price-icon-container {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
    animation: priceIconSpin 8s linear infinite;
}

.price-icon-container i {
    color: #000;
    font-size: 20px;
}

.price-reminder-content {
    flex: 1;
    min-width: 0;
}

.price-reminder-title {
    display: block;
    color: #fbbf24;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 3px;
}

.price-reminder-value {
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeInModal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUpPurchase {
    from {
        transform: translateY(40px) scale(0.96);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideInPurchase {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

@keyframes pulseGlowProperty {

    0%,
    100% {
        box-shadow:
            0 10px 30px rgba(16, 185, 129, 0.5),
            inset 0 -3px 10px rgba(0, 0, 0, 0.2);
    }

    50% {
        box-shadow:
            0 10px 40px rgba(16, 185, 129, 0.7),
            inset 0 -3px 10px rgba(0, 0, 0, 0.2);
    }
}

@keyframes ringExpandProperty {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes priceBoxPulse {

    0%,
    100% {
        border-color: rgba(251, 191, 36, 0.35);
        box-shadow: 0 0 0 rgba(251, 191, 36, 0);
    }

    50% {
        border-color: rgba(251, 191, 36, 0.6);
        box-shadow: 0 0 15px rgba(251, 191, 36, 0.1);
    }
}

@keyframes priceIconSpin {
    from {
        transform: rotateY(0deg);
    }

    to {
        transform: rotateY(360deg);
    }
}

/* =========================================
   RESPONSIVE - MOBILE FIRST
   ========================================= */
@media (max-width: 480px) {
    .purchase-modal {
        padding: 10px;
    }

    .purchase-modal-content {
        max-height: 95vh;
        border-radius: 16px;
    }

    .purchase-modal-body {
        padding: 35px 18px 25px;
    }

    .purchase-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .purchase-title {
        font-size: 18px;
    }

    .purchase-subtitle {
        font-size: 12px;
    }

    .discord-purchase-header {
        padding: 10px 14px;
        font-size: 11px;
    }

    .discord-purchase-body {
        padding: 14px 12px;
    }

    .discord-purchase-body>p {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .purchase-steps-list {
        gap: 6px;
    }

    .purchase-steps-list li {
        padding: 8px 10px;
        gap: 10px;
    }

    .step-icon {
        width: 26px;
        height: 26px;
    }

    .step-icon i {
        font-size: 11px;
    }

    .step-title {
        font-size: 12px;
    }

    .step-desc {
        font-size: 10px;
    }

    .price-reminder-box {
        padding: 12px;
        gap: 10px;
    }

    .price-icon-container {
        width: 36px;
        height: 36px;
    }

    .price-icon-container i {
        font-size: 18px;
    }

    .price-reminder-title {
        font-size: 10px;
    }

    .price-reminder-value {
        font-size: 16px;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) {
    .purchase-modal {
        padding: 5px;
    }

    .purchase-modal-content {
        max-height: 98vh;
    }

    .purchase-modal-body {
        padding: 30px 20px 20px;
    }

    .purchase-header {
        margin-bottom: 12px;
    }

    .purchase-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin-bottom: 10px;
    }

    .purchase-title {
        font-size: 16px;
        margin-bottom: 5px;
    }

    .discord-purchase-box {
        margin: 10px 0;
    }

    .discord-purchase-body {
        padding: 12px;
    }

    .purchase-steps-list li {
        padding: 8px;
    }

    .price-reminder-box {
        margin-top: 10px;
        padding: 10px;
    }
}