/**
 * Frontend Styles for NIDAC Rewards
 */

.nidac-rewards-dashboard-frontend {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    direction: rtl;
}

.nidac-dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.nidac-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.nidac-dashboard-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

.nidac-refresh-dashboard-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.nidac-refresh-dashboard-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.nidac-refresh-dashboard-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.nidac-refresh-dashboard-btn.nidac-refresh-success {
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.5);
}

.nidac-refresh-icon {
    display: inline-block;
    font-size: 16px;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.nidac-user-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.nidac-stat-box {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
}

.nidac-stat-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
}

.nidac-stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.nidac-dashboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.nidac-tab-button {
    background: transparent;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    position: relative;
    top: 2px;
}

.nidac-tab-button:hover {
    color: #2271b1;
}

.nidac-tab-button.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
}

.nidac-tab-content {
    display: none;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    min-height: 400px;
}

.nidac-tab-content.active {
    display: block;
}

.nidac-tab-content h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 24px;
    color: #23282d;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
}

.nidac-tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.nidac-task-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    position: relative;
}

.nidac-task-card:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.nidac-task-card.completed {
    background: #f0f9ff;
    border-color: #00a32a;
    opacity: 0.8;
}

.nidac-task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.nidac-task-header h4 {
    margin: 0;
    font-size: 18px;
    color: #23282d;
    flex: 1;
}

.nidac-completed-badge {
    background: #00a32a;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.nidac-task-description {
    color: #666;
    margin: 0 0 15px;
    line-height: 1.6;
}

.nidac-affiliate-link-box {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    align-items: center;
}

.nidac-affiliate-link-input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #f8fafc;
    direction: ltr;
    text-align: left;
}

.nidac-copy-affiliate-link-btn {
    border: 1px solid #2271b1;
    color: #2271b1;
    background: #fff;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
}

.nidac-copy-affiliate-link-btn:hover {
    background: #eef5ff;
}

.nidac-task-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.nidac-task-points {
    font-size: 16px;
    color: #2271b1;
    font-weight: 600;
}

.nidac-task-badge-preview {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 16px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.nidac-complete-task-btn {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: auto;
}

.nidac-complete-task-btn:hover {
    background: #135e96;
    transform: scale(1.05);
}

.nidac-complete-task-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.nidac-completed-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nidac-completed-task-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.nidac-completed-task-item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nidac-completed-task-info h4 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #23282d;
}

.nidac-completed-task-info p {
    margin: 0 0 15px;
    color: #666;
    line-height: 1.6;
}

.nidac-completed-task-meta {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nidac-points-earned {
    background: #2271b1;
    color: #fff;
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
}

.nidac-completed-date {
    color: #999;
    font-size: 14px;
}

.nidac-badges-display {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.nidac-badge-item {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
}

.nidac-badge-item:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

.nidac-badge-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.nidac-badge-icon-large {
    font-size: 50px;
    line-height: 1;
}

.nidac-badge-item h4 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #23282d;
}

.nidac-badge-item p {
    margin: 0 0 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.nidac-badge-date {
    color: #999;
    font-size: 12px;
}

.nidac-no-items {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

.nidac-rewards-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #856404;
    font-size: 16px;
}

/* Success message */
.nidac-success-message {
    background: #00a32a;
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nidac-dashboard-header {
        padding: 20px;
    }
    
    .nidac-user-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .nidac-dashboard-tabs {
        flex-wrap: wrap;
    }
    
    .nidac-tab-button {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .nidac-tasks-grid,
    .nidac-badges-display {
        grid-template-columns: 1fr;
    }
    
    .nidac-task-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nidac-complete-task-btn {
        width: 100%;
        margin-right: 0;
    }
}

/* Profile Shortcode Styles */
.nidac-rewards-profile {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    direction: rtl;
}

.nidac-profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.nidac-profile-header .nidac-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.nidac-profile-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

.nidac-refresh-profile-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.nidac-refresh-profile-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.nidac-refresh-profile-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.nidac-refresh-profile-btn.nidac-refresh-success {
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.5);
}

.nidac-profile-points {
    display: flex;
    justify-content: center;
}

.nidac-points-display {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.nidac-points-label {
    font-size: 16px;
    opacity: 0.9;
}

.nidac-points-value {
    font-size: 32px;
    font-weight: 700;
}

.nidac-profile-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.nidac-profile-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
}

.nidac-profile-section h3 {
    margin: 0 0 25px;
    font-size: 22px;
    color: #23282d;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
}

.nidac-profile-missions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nidac-profile-mission-item {
    display: flex;
    gap: 15px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.nidac-profile-mission-item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nidac-mission-icon {
    width: 40px;
    height: 40px;
    background: #00a32a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.nidac-mission-content {
    flex: 1;
}

.nidac-mission-content h4 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #23282d;
}

.nidac-mission-description {
    margin: 0 0 12px;
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}

.nidac-mission-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.nidac-mission-points {
    background: #2271b1;
    color: #fff;
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
}

.nidac-mission-date {
    color: #999;
    font-size: 14px;
}

.nidac-profile-badges {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.nidac-profile-badge-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s;
}

.nidac-profile-badge-item:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

.nidac-profile-badge-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.nidac-profile-badge-icon {
    font-size: 40px;
    line-height: 1;
}

.nidac-profile-badge-info {
    width: 100%;
}

.nidac-profile-badge-info h4 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #23282d;
}

.nidac-profile-badge-info p {
    margin: 0 0 10px;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.nidac-profile-badge-date {
    color: #999;
    font-size: 12px;
}

/* Responsive for Profile */
@media (max-width: 768px) {
    .nidac-profile-header {
        padding: 20px;
    }
    
    .nidac-profile-header .nidac-header-top {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .nidac-refresh-profile-btn {
        width: 100%;
        justify-content: center;
    }
    
    .nidac-points-display {
        flex-direction: column;
        gap: 10px;
    }
    
    .nidac-profile-section {
        padding: 20px;
    }
    
    .nidac-profile-mission-item {
        flex-direction: column;
        text-align: center;
    }
    
    .nidac-mission-icon {
        margin: 0 auto;
    }
    
    .nidac-profile-badges {
        grid-template-columns: 1fr;
    }
}

