/**
 * PMPro ⇄ Elementor Display - Frontend Styles
 * 
 * These styles provide basic styling for membership badges and subscribe buttons.
 * All styles can be overridden by your theme or Elementor custom CSS.
 */

/* Membership Badge Styles */
.mpd-badge {
    display: inline-block;
    background: #007cba;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin: 4px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.mpd-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.mpd-badge-name {
    display: block;
    font-weight: 600;
}

.mpd-badge-price {
    display: block;
    font-size: 11px;
    opacity: 0.9;
    margin-top: 2px;
}

/* Free badge */
.mpd-badge-free {
    background: #6c757d;
    color: #ffffff;
}

/* Different level colors */
.mpd-badge-level-1 {
    background: #28a745;
}

.mpd-badge-level-2 {
    background: #ffc107;
    color: #212529;
}

.mpd-badge-level-3 {
    background: #fd7e14;
}

.mpd-badge-level-4 {
    background: #dc3545;
}

.mpd-badge-level-5 {
    background: #6f42c1;
}

/* Subscribe Button Styles */
.mpd-subscribe-button {
    display: inline-block;
    background: #007cba;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: all 0.2s ease;
    border: 2px solid #007cba;
    cursor: pointer;
    margin: 8px 0;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.2);
}

.mpd-subscribe-button:hover {
    background: #005a87;
    border-color: #005a87;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.mpd-subscribe-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.2);
}

/* Different level button colors */
.mpd-subscribe-level-1 {
    background: #28a745;
    border-color: #28a745;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.mpd-subscribe-level-1:hover {
    background: #218838;
    border-color: #218838;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.mpd-subscribe-level-2 {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.2);
}

.mpd-subscribe-level-2:hover {
    background: #e0a800;
    border-color: #e0a800;
    color: #212529;
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

.mpd-subscribe-level-3 {
    background: #fd7e14;
    border-color: #fd7e14;
    box-shadow: 0 2px 4px rgba(253, 126, 20, 0.2);
}

.mpd-subscribe-level-3:hover {
    background: #e8690b;
    border-color: #e8690b;
    box-shadow: 0 4px 8px rgba(253, 126, 20, 0.3);
}

.mpd-subscribe-level-4 {
    background: #dc3545;
    border-color: #dc3545;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.mpd-subscribe-level-4:hover {
    background: #c82333;
    border-color: #c82333;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.mpd-subscribe-level-5 {
    background: #6f42c1;
    border-color: #6f42c1;
    box-shadow: 0 2px 4px rgba(111, 66, 193, 0.2);
}

.mpd-subscribe-level-5:hover {
    background: #5a32a3;
    border-color: #5a32a3;
    box-shadow: 0 4px 8px rgba(111, 66, 193, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mpd-badge {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .mpd-subscribe-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Elementor compatibility */
.elementor-widget .mpd-badge,
.elementor-widget .mpd-subscribe-button {
    margin: 0;
}

/* Theme compatibility - allow easy override */
.mpd-badge,
.mpd-subscribe-button {
    font-family: inherit;
}

/* Focus states for accessibility */
.mpd-subscribe-button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Smart Button Styles */
.mpd-guest-button {
    background: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
}

.mpd-guest-button:hover {
    background: #5a6268;
    border-color: #5a6268;
    color: #ffffff;
}

.mpd-member-button {
    background: #28a745;
    border-color: #28a745;
    color: #ffffff;
}

.mpd-member-button:hover {
    background: #218838;
    border-color: #218838;
    color: #ffffff;
}

/* Card Features List */
.mpd-card-features {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.mpd-card-features li {
    padding: 5px 0;
    padding-right: 20px;
    position: relative;
    font-size: 14px;
    line-height: 1.4;
}

.mpd-card-features li:before {
    content: "✓";
    position: absolute;
    right: 0;
    color: #28a745;
    font-weight: bold;
}

/* Card Data Styles */
.mpd-card-data {
    display: block;
    margin: 5px 0;
}

.mpd-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.mpd-card-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.mpd-card-price {
    font-size: 20px;
    font-weight: 700;
    color: #007cba;
}

.mpd-card-duration {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mpd-card-level {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: #e9ecef;
    color: #495057;
}

.mpd-card-rating {
    color: #ffc107;
    font-weight: 600;
}

.mpd-card-instructor {
    font-size: 13px;
    color: #666;
}

.mpd-card-category {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 11px;
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.mpd-card-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: #dc3545;
    color: #ffffff;
    margin-bottom: 5px;
}

/* Read More Button Styles */
.mpd-read-more-button {
    display: inline-block;
    background: #28a745;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    transition: all 0.2s ease;
    border: 2px solid #28a745;
    cursor: pointer;
    margin: 8px 0;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
    position: relative;
    overflow: hidden;
}

.mpd-read-more-button:hover {
    background: #218838;
    border-color: #218838;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.mpd-read-more-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.mpd-read-more-button:focus {
    outline: 2px solid #28a745;
    outline-offset: 2px;
}

/* Public post button variant */
.mpd-public-post-button {
    background: #17a2b8;
    border-color: #17a2b8;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.2);
}

.mpd-public-post-button:hover {
    background: #138496;
    border-color: #138496;
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.3);
}

.mpd-public-post-button:focus {
    outline-color: #17a2b8;
}

/* Loading state (for future JS enhancements) */
.mpd-subscribe-button.loading {
    opacity: 0.7;
    pointer-events: none;
}

.mpd-subscribe-button.loading::after {
    content: "...";
    animation: dots 1.5s steps(5, end) infinite;
}

.mpd-read-more-button.loading {
    opacity: 0.7;
    pointer-events: none;
}

.mpd-read-more-button.loading::after {
    content: "...";
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        color: rgba(0, 0, 0, 0);
        text-shadow: .25em 0 0 rgba(0, 0, 0, 0), .5em 0 0 rgba(0, 0, 0, 0);
    }
    40% {
        color: currentColor;
        text-shadow: .25em 0 0 rgba(0, 0, 0, 0), .5em 0 0 rgba(0, 0, 0, 0);
    }
    60% {
        text-shadow: .25em 0 0 currentColor, .5em 0 0 rgba(0, 0, 0, 0);
    }
    80%, 100% {
        text-shadow: .25em 0 0 currentColor, .5em 0 0 currentColor;
    }
}
