/* WooCommerce我的账户页面 - 会员平台样式 */

/* 会员资料页面 */
.mp-woo-member-profile {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mp-profile-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

.mp-profile-info {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.mp-profile-avatar img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f0f0f0;
}

.mp-avatar-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
}

.mp-profile-details h4 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.mp-email {
    color: #666;
    margin: 5px 0;
}

.mp-username {
    color: #999;
    margin: 5px 0;
    font-style: italic;
}

.mp-member-since {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    color: #666;
}

/* QR码区域 */
.mp-qr-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    color: white;
}

.mp-qr-section h4 {
    color: white;
    margin: 0 0 20px 0;
}

.mp-qr-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.mp-qr-container img {
    max-width: 100%;
    height: auto;
}

.mp-qr-hint {
    color: #666;
    margin: 0;
}

.mp-generate-qr-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.mp-generate-qr-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.mp-qr-description {
    margin-top: 10px;
    opacity: 0.9;
}

/* 我的奖励页面 */
.mp-woo-rewards {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mp-rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mp-reward-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    border-left: 4px solid #28a745;
    position: relative;
    transition: all 0.3s;
}

.mp-reward-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.mp-reward-card.expired {
    opacity: 0.6;
    border-left-color: #dc3545;
}

.mp-expired-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.mp-reward-icon {
    font-size: 48px;
    margin-bottom: 15px;
    text-align: center;
}

.mp-reward-card h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.mp-reward-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.mp-reward-type {
    background: #007cba;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.mp-reward-discount {
    background: #f0f0f0;
    color: #333;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.mp-reward-description {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 14px;
}

.mp-expiry-info {
    color: #dc3545;
    font-size: 12px;
    margin-bottom: 15px;
}

.mp-show-reward-qr {
    width: 100%;
    background: #28a745;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.mp-show-reward-qr:hover {
    background: #218838;
}

/* 我的会员卡页面 */
.mp-woo-member-cards {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mp-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.mp-card-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.mp-card-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.mp-card-item.available {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.mp-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.mp-card-content {
    padding: 25px;
    color: white;
}

.mp-card-content h4 {
    margin: 0 0 12px 0;
    color: white;
    font-size: 20px;
}

.mp-card-issuer {
    margin: 0 0 12px 0;
    opacity: 0.9;
    font-size: 14px;
}

.mp-card-excerpt {
    margin: 0 0 20px 0;
    opacity: 0.85;
    line-height: 1.5;
    font-size: 14px;
}

.mp-card-content .button {
    background: white;
    color: #667eea;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.mp-card-content .button:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

.mp-card-item.available .button {
    color: #f5576c;
}

/* 个人资料图片字段 */
.mp-profile-picture-field {
    margin-bottom: 20px;
}

.mp-upload-profile-picture {
    margin-left: 10px;
}

.mp-profile-picture-preview {
    margin-top: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mp-profile-section {
        grid-template-columns: 1fr;
    }

    .mp-profile-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .mp-rewards-grid,
    .mp-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* WooCommerce兼容性 */
.woocommerce-account .mp-woo-member-profile,
.woocommerce-account .mp-woo-rewards,
.woocommerce-account .mp-woo-member-cards {
    margin-bottom: 20px;
}

/* 确保与WooCommerce主题一致 */
.woocommerce-account .mp-woo-member-profile h3,
.woocommerce-account .mp-woo-rewards h3,
.woocommerce-account .mp-woo-member-cards h3 {
    margin-top: 0;
}

/* 公司资料字段样式 */
.mp-company-profile-fields {
    border: 2px solid #667eea;
    border-radius: 10px;
    padding: 30px;
    margin: 30px 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.mp-company-profile-fields legend {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    padding: 0 15px;
    margin-bottom: 10px;
}

.mp-company-profile-fields > .description {
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
    display: block;
}

.mp-company-profile-fields .form-row {
    margin-bottom: 25px;
}

.mp-company-profile-fields label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.mp-company-profile-fields small.description {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 12px;
}

.mp-upload-banner-image {
    margin-top: 10px;
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.mp-upload-banner-image:hover {
    background: #5568d3;
}

.mp-banner-preview {
    margin-top: 15px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 10px;
    background: white;
}

.mp-company-profile-fields textarea {
    min-height: 100px;
    resize: vertical;
}

/* 字符计数提示 */
.mp-company-profile-fields .char-count {
    float: right;
    color: #999;
    font-size: 11px;
    margin-top: 5px;
}
