/* Membership Plugin Dashboard Styles */

.mp-user-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Section Styles */
.mp-section {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.mp-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.mp-section h3 {
    margin: 0 0 25px 0;
    color: #1a202c;
    font-size: 1.5em;
    font-weight: 700;
    border-bottom: 3px solid #3b82f6;
    padding-bottom: 12px;
    position: relative;
}

.mp-section h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

/* Alert Styles */
.mp-alert {
    padding: 20px 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    position: relative;
    border-left: 5px solid;
}

.mp-alert-warning {
    background: linear-gradient(135deg, #fef3cd, #fde68a);
    border-left-color: #f59e0b;
    color: #92400e;
}

.mp-alert h4 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    font-weight: 600;
}

.mp-alert p {
    margin: 8px 0;
}

/* Membership Cards */
.mp-membership-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.mp-membership-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.mp-membership-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.mp-membership-card:hover::before {
    transform: scaleX(1);
}

.mp-membership-card.mp-active {
    border-color: #10b981;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.mp-membership-card.mp-expired {
    border-color: #ef4444;
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
    opacity: 0.8;
}

.mp-membership-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.mp-card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 20px 25px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mp-card-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 1.3em;
    font-weight: 700;
    flex: 1;
}

.mp-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mp-status-active {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
}

.mp-status-expired {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
}

.mp-card-body {
    padding: 25px;
}

.mp-card-info {
    margin-bottom: 25px;
}

.mp-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.mp-info-row:hover {
    background-color: #f8fafc;
    margin: 0 -10px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 6px;
}

.mp-info-row:last-child {
    border-bottom: none;
}

.mp-label {
    font-weight: 600;
    color: #64748b;
    font-size: 14px;
}

.mp-value {
    font-weight: 700;
    color: #1e293b;
    font-size: 14px;
}

.mp-value.mp-expiring {
    color: #dc2626;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.mp-card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Button Styles */
.mp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mp-btn::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;
}

.mp-btn:hover::before {
    left: 100%;
}

.mp-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.mp-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    color: white;
}

.mp-btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.mp-btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4);
    color: white;
}

.mp-btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.mp-btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
    color: white;
}

.mp-btn-outline {
    background: transparent;
    border: 2px solid #3b82f6;
    color: #3b82f6;
}

.mp-btn-outline:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.mp-btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.mp-btn-full {
    width: 100%;
}

/* Course List */
.mp-course-list {
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-top: 1px solid #e2e8f0;
    margin-top: 20px;
}

.mp-course-list h5 {
    margin: 0 0 15px 0;
    color: #1e293b;
    font-weight: 600;
}

.mp-course-item {
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.mp-course-item:last-child {
    border-bottom: none;
}

.mp-course-item:hover {
    background-color: rgba(59, 130, 246, 0.05);
    margin: 0 -10px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 4px;
}

.mp-course-item a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.mp-course-item a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Course Grid */
.mp-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.mp-course-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.mp-course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.mp-course-card:hover::before {
    transform: scaleX(1);
}

.mp-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.mp-course-thumbnail {
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mp-course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mp-course-card:hover .mp-course-thumbnail img {
    transform: scale(1.05);
}

.mp-course-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
    font-size: 48px;
}

.mp-course-content {
    padding: 20px;
}

.mp-course-content h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.mp-course-content h4 a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mp-course-content h4 a:hover {
    color: #3b82f6;
}

.mp-access-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mp-direct-access {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

/* Empty State */
.mp-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.mp-empty-state p {
    margin-bottom: 25px;
    font-size: 16px;
    color: #9ca3af;
}

.mp-empty-state::before {
    content: '📦';
    display: block;
    font-size: 64px;
    margin-bottom: 20px;
}

/* Collapsible Sections */
.mp-section-collapsed .mp-section-content {
    display: none;
}

.mp-section-toggle {
    cursor: pointer;
    position: relative;
    padding-right: 40px;
    transition: color 0.2s ease;
}

.mp-section-toggle:hover {
    color: #3b82f6;
}

.mp-toggle-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.2em;
}

.mp-section-collapsed .mp-toggle-icon {
    transform: translateY(-50%) rotate(-90deg);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .mp-user-dashboard {
        padding: 15px;
    }
    
    .mp-membership-cards {
        grid-template-columns: 1fr;
    }
    
    .mp-course-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .mp-user-dashboard {
        padding: 10px;
    }
    
    .mp-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .mp-membership-cards {
        gap: 20px;
    }
    
    .mp-card-actions {
        flex-direction: column;
    }
    
    .mp-btn {
        width: 100%;
        justify-content: center;
    }
    
    .mp-course-grid {
        grid-template-columns: 1fr;
    }
    
    .mp-card-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .mp-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .mp-section h3 {
        font-size: 1.2em;
    }
    
    .mp-card-header h4 {
        font-size: 1.1em;
    }
    
    .mp-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* Loading States */
.mp-loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.mp-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Print Styles */
@media print {
    .mp-btn,
    .mp-card-actions,
    .mp-section-toggle {
        display: none;
    }
    
    .mp-section {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .mp-membership-card {
        break-inside: avoid;
    }
}