/* Membershiping Frontend Styles */

/* Form Styles */
.membershiping-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.membershiping-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.membershiping-field {
    margin-bottom: 20px;
}

.membershiping-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.membershiping-field input[type="text"],
.membershiping-field input[type="email"],
.membershiping-field input[type="tel"],
.membershiping-field input[type="url"],
.membershiping-field input[type="number"],
.membershiping-field textarea,
.membershiping-field select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.membershiping-field input:focus,
.membershiping-field textarea:focus,
.membershiping-field select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.membershiping-field textarea {
    min-height: 100px;
    resize: vertical;
}

.membershiping-field .required {
    color: #d63638;
}

.field-description {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* Radio and Checkbox Styles */
.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    font-weight: normal !important;
}

.radio-label input,
.checkbox-label input {
    margin-right: 8px;
    margin-bottom: 0;
    width: auto;
}

/* Submit Button */
.membershiping-submit-btn {
    background: #007cba;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.membershiping-submit-btn:hover {
    background: #005a87;
}

.membershiping-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Popup Form Styles */
.membershiping-form.membershiping-form-popup {
    position: relative;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Inline Form Styles */
.membershiping-form.membershiping-form-inline {
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 20px 0;
}

/* Widget Form Styles */
.membershiping-form.membershiping-form-widget {
    padding: 20px;
    max-width: none;
}

/* Badge Styles */
.membershiping-user-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    gap: 6px;
    margin: 5px;
}

.membershiping-user-badge .badge-icon {
    width: 16px;
    height: 16px;
}

.membershiping-user-badge .badge-discount {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
}

/* Points Display */
.membershiping-points-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.points-value {
    font-size: 36px;
    font-weight: bold;
    color: #007cba;
    margin-bottom: 5px;
}

.points-label {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Progress Bar */
.membershiping-progress {
    background: #e9ecef;
    border-radius: 10px;
    height: 20px;
    margin: 15px 0;
    overflow: hidden;
}

.membershiping-progress-bar {
    background: linear-gradient(90deg, #007cba, #72aee6);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 10px;
    position: relative;
}

.membershiping-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Content Restriction Message */
.membershiping-restriction-message {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 4px solid #007cba;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.membershiping-restriction-message h3 {
    margin-top: 0;
    color: #007cba;
}

.membershiping-restriction-message .button {
    background: #007cba;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    margin: 0 5px;
    display: inline-block;
    transition: background-color 0.3s;
}

.membershiping-restriction-message .button:hover {
    background: #005a87;
    color: #fff;
}

/* Member Pricing Display */
.membershiping-original-price {
    color: #999;
    text-decoration: line-through;
}

.membershiping-member-price {
    color: #d63638;
    font-weight: bold;
    font-size: 1.1em;
}

.membershiping-discount-badge {
    background: #d63638;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
}

/* Shop Badge */
.membershiping-shop-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #007cba;
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
}

.membershiping-login-for-discount {
    text-align: center;
    margin-top: 10px;
}

.membershiping-login-for-discount a {
    color: #007cba;
    text-decoration: none;
    font-size: 12px;
}

.membershiping-login-for-discount a:hover {
    text-decoration: underline;
}

/* Product Restriction */
.membershiping-product-restriction {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
    color: #856404;
}

/* User Dashboard Widget */
.membershiping-user-dashboard {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.membershiping-user-dashboard h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.user-stat {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.user-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #007cba;
    margin-bottom: 5px;
}

.user-stat-label {
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Flag Display */
.membershiping-user-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.membershiping-flag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    gap: 4px;
}

/* Loading States */
.membershiping-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.membershiping-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #007cba;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: membershiping-spin 1s linear infinite;
    z-index: 100;
}

@keyframes membershiping-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Messages */
.membershiping-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.membershiping-message.success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.membershiping-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c2c7;
}

.membershiping-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffecb5;
}

.membershiping-message.info {
    background: #d1ecf1;
    color: #055160;
    border: 1px solid #b6d4fe;
}

/* Responsive Design */
@media (max-width: 768px) {
    .membershiping-form {
        padding: 20px;
        margin: 20px;
    }
    
    .user-stats {
        grid-template-columns: 1fr;
    }
    
    .membershiping-user-flags {
        justify-content: center;
    }
    
    .membershiping-discount-badge {
        display: block;
        margin: 5px 0;
        text-align: center;
    }
    
    .membershiping-shop-badge {
        position: static;
        display: inline-block;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .membershiping-form {
        margin: 10px;
        padding: 15px;
    }
    
    .points-value {
        font-size: 28px;
    }
    
    .membershiping-user-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .membershiping-restriction-message {
        padding: 15px;
        margin: 15px 10px;
    }
}

/* Animation Effects */
.membershiping-fade-in {
    animation: membershiping-fade-in 0.5s ease-out;
}

@keyframes membershiping-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.membershiping-slide-up {
    animation: membershiping-slide-up 0.3s ease-out;
}

@keyframes membershiping-slide-up {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* WooCommerce Member Pricing Styles */
.membershiping-original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9em;
}

.membershiping-member-price {
    color: #d63638;
    font-weight: bold;
    font-size: 1.1em;
}

.membershiping-member-price-label {
    font-size: 0.9em;
    color: #666;
    font-weight: normal;
}

.membershiping-discount-badge {
    background: #007cba;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
    display: inline-block;
}

.membershiping-detailed-pricing {
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.membershiping-detailed-pricing h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.membershiping-detailed-pricing .member-savings {
    color: #00a32a;
    font-weight: bold;
    font-size: 1.1em;
    margin: 0;
}

.membershiping-detailed-pricing .member-login-prompt {
    color: #646970;
    margin: 0;
}

.membershiping-detailed-pricing .member-login-prompt a {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
}

.membershiping-detailed-pricing .member-login-prompt a:hover {
    text-decoration: underline;
}

.membershiping-shop-pricing {
    margin-top: 8px;
    font-size: 0.9em;
}

.membershiping-shop-pricing .member-discount-available {
    background: #00a32a;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.membershiping-shop-pricing .member-discount-prompt {
    background: #f0f6fc;
    color: #0073aa;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #c3c4c7;
}

.membershiping-shop-pricing .member-discount-prompt a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.membershiping-shop-pricing .member-discount-prompt a:hover {
    text-decoration: underline;
}

/* Responsive Styles for Mobile */
@media (max-width: 768px) {
    .membershiping-detailed-pricing {
        padding: 15px;
        margin: 15px 0;
    }
    
    .membershiping-member-price {
        display: block;
        margin-top: 5px;
    }
    
    .membershiping-discount-badge {
        display: block;
        text-align: center;
        margin: 5px 0 0 0;
        padding: 4px 8px;
    }
    
    .membershiping-shop-pricing {
        text-align: center;
    }
}

/* Print Styles */
@media print {
    .membershiping-form,
    .membershiping-popup-overlay,
    .membershiping-shop-badge,
    .membershiping-discount-badge,
    .membershiping-detailed-pricing,
    .membershiping-shop-pricing {
        display: none !important;
    }
    
    .membershiping-restriction-message {
        border: 1px solid #000;
        background: #fff;
    }
}

/* My Account Pages */
.membershiping-my-badges,
.membershiping-my-flags,
.membershiping-my-submissions {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.membershiping-my-badges h2,
.membershiping-my-flags h2,
.membershiping-my-submissions h2 {
    color: #495057;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007cba;
}

/* Current Badge Section */
.current-badge-section {
    margin-bottom: 30px;
}

.current-badge-card {
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.badge-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
    display: block;
}

.badge-info h4 {
    margin: 10px 0 5px 0;
    font-size: 1.5em;
}

.badge-points,
.badge-discount {
    font-size: 1.1em;
    margin: 5px 0;
}

.no-badge {
    text-align: center;
    padding: 40px 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    color: #856404;
}

/* Badge Progress Section */
.badge-progress-section {
    margin: 30px 0;
}

.next-badge-preview {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-radius: 10px;
    background: white;
    border: 2px solid #e9ecef;
}

.progress-details {
    flex: 1;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00c6ff 0%, #0072ff 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    color: #6c757d;
    font-size: 0.9em;
}

/* Badge Levels Overview */
.badges-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.badge-level {
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
}

.badge-level.earned {
    border-color: #28a745;
    background: #f8fff8;
}

.badge-level.current {
    border-color: #007cba;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: scale(1.05);
}

.badge-name {
    font-weight: bold;
    margin: 10px 0 5px 0;
    color: #495057;
}

.badge-requirement {
    font-size: 0.9em;
    color: #6c757d;
    margin: 5px 0;
}

.badge-discount {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    display: inline-block;
    margin-top: 5px;
}

/* Flags Section */
.no-flags {
    text-align: center;
    padding: 40px 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    color: #856404;
}

.flags-list {
    display: grid;
    gap: 15px;
}

.flag-item {
    padding: 20px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.flag-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.flag-header h4 {
    margin: 0;
    color: #495057;
}

.flag-description {
    color: #6c757d;
    margin: 10px 0;
}

.flag-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.flag-points,
.flag-assigned {
    font-size: 0.9em;
    color: #6c757d;
}

.remove-flag {
    margin-left: auto;
}

/* Submissions Section */
.no-submissions {
    text-align: center;
    padding: 40px 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    color: #856404;
}

.submissions-list {
    display: grid;
    gap: 15px;
}

.submission-item {
    padding: 20px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.submission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.submission-header h4 {
    margin: 0;
    color: #495057;
}

.submission-date {
    color: #6c757d;
    font-size: 0.9em;
}

.submission-preview {
    margin: 15px 0;
}

.field-preview {
    display: block;
    margin: 5px 0;
    color: #6c757d;
}

.submission-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

/* Enhanced My Account Responsive Styles */
@media (max-width: 768px) {
    .badges-overview {
        grid-template-columns: 1fr;
    }
    
    .next-badge-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .flag-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .submission-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
