/* eWP Memberships Frontend Styles */

/* Plans Container */
.hpm-plans-container {
    display: grid;
    gap: 30px;
    margin: 30px 0;
}

.hpm-plans-container[data-columns="1"] { 
    grid-template-columns: 1fr; 
}

.hpm-plans-container[data-columns="2"] { 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
}

.hpm-plans-container[data-columns="3"] { 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
}

.hpm-plans-container[data-columns="4"] { 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
}

/* Plan Cards */
.hpm-plan-card, .hmp-plan-card  {
    background: #fff;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.hpm-plan-card:hover {
    border-color: #007cba;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hpm-plan-card.featured {
    border-color: #007cba;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: scale(1.05);
}

.hpm-plan-card.featured::before {
    content: "Recomendado";
    position: absolute;
    top: 15px;
    right: -35px;
    background: #007cba;
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

/* Plan Elements */
.hpm-plan-type {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.hpm-plan-title {
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 15px 0;
    color: #333;
    line-height: 1.2;
}

.hpm-plan-price {
    font-size: 42px;
    font-weight: 700;
    color: #007cba;
    margin: 25px 0;
    line-height: 1;
}

.hpm-plan-price .currency {
    font-size: 24px;
    vertical-align: top;
    margin-right: 2px;
}

.hpm-plan-price .period {
    font-size: 18px;
    color: #666;
    font-weight: 400;
    display: block;
    margin-top: 5px;
}

.hpm-setup-fee {
    color: #666;
    font-size: 14px;
    margin: 10px 0;
    font-style: italic;
}

.hpm-plan-trial {
    background: linear-gradient(135deg, #e7f3ff 0%, #cce7ff 100%);
    color: #007cba;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    margin: 20px 0;
    display: inline-block;
    border: 1px solid #007cba;
}

.hpm-plan-description {
    color: #666;
    margin: 25px 0;
    line-height: 1.6;
    font-size: 15px;
}

/* Plan Features */
.hpm-plan-features {
    list-style: none;
    padding: 0;
    margin: 25px 0;
    text-align: left;
}

.hpm-plan-features li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    font-size: 15px;
    position: relative;
    padding-left: 25px !important;
}

.hpm-plan-features li:last-child {
    border-bottom: none;
}

.hpm-plan-features li:before {
    content: "✓";
    color: #007cba;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 10px;
    font-size: 16px;
}

/* Plan Button */
.hpm-plan-button {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    padding: 15px 35px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    margin-top: 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
    cursor: pointer;
}

.hpm-plan-button:hover {
    background: linear-gradient(135deg, #005a87 0%, #004066 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
}

.hpm-plan-button.purchased {
    background: linear-gradient(135deg, #46b450 0%, #3a9240 100%);
    cursor: default;
    box-shadow: 0 4px 15px rgba(70, 180, 80, 0.3);
}

.hpm-plan-button.purchased:hover {
    background: linear-gradient(135deg, #46b450 0%, #3a9240 100%);
    transform: none;
    box-shadow: 0 4px 15px rgba(70, 180, 80, 0.3);
}

/* User Memberships */
.hpm-user-memberships {
    margin: 30px 0;
}

.hpm-user-memberships h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.hpm-membership-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

.hpm-membership-card:hover {
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.hpm-membership-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.hpm-membership-header h4 {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.hpm-membership-status {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hpm-membership-status.status-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.hpm-membership-status.status-expired {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.hpm-membership-status.status-cancelled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.hpm-membership-details p {
    margin: 12px 0;
    color: #666;
    font-size: 15px;
}

.hpm-membership-details strong {
    color: #333;
    font-weight: 600;
}

.hpm-days-left {
    color: #007cba !important;
    font-weight: bold !important;
    background: #e7f3ff;
    padding: 5px 12px;
    border-radius: 15px;
    display: inline-block;
    font-size: 14px !important;
}

.hpm-membership-description {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #555;
    line-height: 1.6;
}

/* Membership Status Widget */
.hpm-membership-status-widget {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #dee2e6;
}

.hpm-status-icon {
    margin-right: 15px;
    font-size: 24px;
}

.hpm-status-text {
    color: #333;
    font-size: 16px;
}

/* Modal Styles */
#hpm-membership-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.hpm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
}

.hpm-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 0;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.hpm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.hpm-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.hpm-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.hpm-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.hpm-modal-body {
    padding: 30px;
}

.hpm-memberships-list {
    margin: 0;
}

.hpm-membership-item {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.hpm-membership-item:last-child {
    border-bottom: none;
}

.hpm-membership-item h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.hpm-membership-item p {
    margin: 8px 0;
    color: #666;
    font-size: 14px;
}

.hpm-membership-item .status-active { 
    color: #46b450; 
    font-weight: bold; 
}

.hpm-membership-item .status-expired { 
    color: #ffb900; 
    font-weight: bold; 
}

.hpm-membership-item .status-cancelled { 
    color: #dc3232; 
    font-weight: bold; 
}

/* WooCommerce Integration */
.hpm-price-period {
    color: #666 !important;
    font-size: 0.8em !important;
    font-weight: normal !important;
}

.hpm-trial-notice {
    color: #007cba !important;
    font-size: 0.7em !important;
    display: block;
    margin-top: 5px;
    font-weight: 600 !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hpm-plans-container[data-columns="4"] { 
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    }
}

@media (max-width: 768px) {
    .hpm-plans-container {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .hpm-plan-card {
        padding: 25px 15px;
    }
    
    .hpm-plan-price {
        font-size: 36px;
    }
    
    .hpm-plan-title {
        font-size: 24px;
    }
    
    .hpm-membership-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .hpm-modal-content {
        width: 95%;
        max-height: 90%;
    }
    
    .hpm-modal-header,
    .hpm-modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hpm-plan-card {
        padding: 20px 10px;
    }
    
    .hpm-plan-price {
        font-size: 32px;
    }
    
    .hpm-plan-title {
        font-size: 20px;
    }
    
    .hpm-plan-button {
        padding: 12px 25px;
        font-size: 14px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .hpm-plan-card {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .hpm-plan-title {
        color: #e2e8f0;
    }
    
    .hpm-plan-description {
        color: #a0aec0;
    }
    
    .hpm-plan-features li {
        color: #cbd5e0;
        border-bottom-color: #4a5568;
    }
    
    .hpm-membership-card {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .hpm-modal-content {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .hpm-modal-header {
        background: #1a202c;
        border-bottom-color: #4a5568;
    }
}

/* Print styles */
@media print {
    .hpm-plan-button,
    .hpm-modal-overlay,
    .hpm-modal-content {
        display: none !important;
    }
    
    .hpm-plan-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
} 