/**
 * Styles for Credits for wpDiscuz Reviews plugin
 */

/* Admin Styles */
.my-review-credits-admin .postbox {
    margin-bottom: 20px;
}

.my-review-credits-admin .postbox h2 {
    margin: 0;
    padding: 12px 20px;
    border-bottom: 1px solid #ccd0d4;
    background: #f1f1f1;
}

.my-review-credits-admin .inside {
    padding: 20px;
}

.my-credits-table-wrapper {
    margin: 15px 0;
}

.my-credits-table-wrapper table {
    margin: 0;
}

.my-credits-table-wrapper th,
.my-credits-table-wrapper td {
    padding: 12px 8px;
    vertical-align: middle;
}

.my-credits-table-wrapper .credits-input {
    margin-right: 8px;
}

.my-credits-table-wrapper .update-credits-btn {
    margin-left: 5px;
}

.my-credits-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

/* Reward Image Styles */
.reward-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.reward-image-container {
    text-align: center;
}

.reward-image-container img {
    max-width: 150px;
    max-height: 150px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.redeem-option {
    transition: all 0.3s ease;
}

.redeem-option:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.redeem-option.available {
    border-color: #0073aa;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.redeem-option.unavailable {
    border-color: #ddd;
    background: #f9f9f9;
    opacity: 0.7;
}

.redeem-option.unavailable .reward-image {
    /*filter: grayscale(50%);*/
}

.reward-image-upload-container {
    position: relative;
}

.reward-image-preview {
    position: relative;
    display: inline-block;
}

.reward-image-preview img {
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.reward-image-preview img:hover {
    border-color: #0073aa;
}

.remove-reward-image {
    background: #dc3232 !important;
    color: white !important;
    border-color: #dc3232 !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
    margin-top: 5px !important;
}

.remove-reward-image:hover {
    background: #a00 !important;
    border-color: #a00 !important;
}

.reward-image-upload {
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 10px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.reward-image-upload:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.reward-image-upload:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.select-media-image,
.upload-new-image {
    background: #0073aa !important;
    color: white !important;
    border-color: #0073aa !important;
    font-size: 12px !important;
    padding: 6px 12px !important;
    border-radius: 3px !important;
    transition: all 0.3s ease !important;
}

.select-media-image:hover,
.upload-new-image:hover {
    background: #005a87 !important;
    border-color: #005a87 !important;
    transform: translateY(-1px);
}

.select-media-image:focus,
.upload-new-image:focus {
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.3) !important;
    outline: none !important;
}

/* Admin reward options styling */
.redeem-option-row {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.redeem-option-row:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.redeem-option-row label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.redeem-option-row input[type="number"],
.redeem-option-row input[type="text"] {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.redeem-option-row input[type="number"]:focus,
.redeem-option-row input[type="text"]:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* Responsive design for reward options */
@media (max-width: 768px) {
    .redeem-option {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .reward-image-container {
        flex: none !important;
        text-align: center;
    }
    
    .reward-info {
        flex: none !important;
    }
    
    .redeem-option-row > div {
        flex: none !important;
        min-width: auto !important;
    }
}

/* Social Media Verification Modal Styles */
.social-verification-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.social-verification-content {
    position: relative;
    background: #fff;
    margin: 10% auto;
    padding: 0;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.social-verification-header {
    background: linear-gradient(135deg, #FF6216 0%, #ff8c42 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-verification-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.social-verification-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.social-verification-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.social-verification-body {
    padding: 30px 25px;
    text-align: center;
}

.verification-question {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
}

.verification-instruction {
    font-size: 14px;
    color: #666;
    margin: 0 0 25px 0;
    line-height: 1.5;
}

.verification-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.verification-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.verification-yes {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.verification-yes:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.verification-no {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #dee2e6;
}

.verification-no:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .social-verification-content {
        margin: 5% auto;
        width: 95%;
    }
    
    .social-verification-header {
        padding: 15px 20px;
    }
    
    .social-verification-header h3 {
        font-size: 18px;
    }
    
    .social-verification-body {
        padding: 20px 15px;
    }
    
    .verification-question {
        font-size: 16px;
    }
    
    .verification-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .verification-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Frontend Styles */
.my-review-credits-display,
.my-user-credits-display {
    display: inline-block;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
}

.my-review-credits-display .credits-label,
.my-user-credits-display .credits-label {
    font-weight: 600;
    color: #495057;
    margin-right: 5px;
}

.my-review-credits-display .credits-amount,
.my-user-credits-display .credits-amount {
    font-weight: bold;
    color: #28a745;
    font-size: 16px;
}

.my-review-credits-display.not-logged-in,
.my-user-credits-display.error,
.my-user-credits-display.no-permission {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Leaderboard Styles */
.my-credits-leaderboard {
    margin: 20px 0;
}

.my-credits-leaderboard .leaderboard-title {
    margin: 0 0 15px 0;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.my-credits-leaderboard .leaderboard-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.my-credits-leaderboard .leaderboard-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.my-credits-leaderboard .leaderboard-item:last-child {
    border-bottom: none;
}

.my-credits-leaderboard .leaderboard-item:hover {
    background: #f8f9fa;
}

.my-credits-leaderboard .leaderboard-item.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-bottom-color: #ffd700;
}

.my-credits-leaderboard .leaderboard-item.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    border-bottom-color: #c0c0c0;
}

.my-credits-leaderboard .leaderboard-item.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #daa520);
    border-bottom-color: #cd7f32;
    color: #fff;
}

.my-credits-leaderboard .rank {
    font-weight: bold;
    font-size: 16px;
    margin-right: 10px;
    min-width: 30px;
    text-align: center;
}

.my-credits-leaderboard .user-avatar {
    margin-right: 10px;
    border-radius: 50%;
}

.my-credits-leaderboard .user-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.my-credits-leaderboard .user-name {
    font-weight: 600;
    color: #333;
}

.my-credits-leaderboard .user-credits {
    font-weight: bold;
    color: #28a745;
    font-size: 14px;
}

.my-credits-leaderboard .leaderboard-item.rank-1 .user-name,
.my-credits-leaderboard .leaderboard-item.rank-1 .user-credits,
.my-credits-leaderboard .leaderboard-item.rank-3 .user-name,
.my-credits-leaderboard .leaderboard-item.rank-3 .user-credits {
    color: inherit;
}

.my-credits-leaderboard.empty {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .my-credits-leaderboard .leaderboard-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    
    .my-credits-leaderboard .user-info {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 8px;
    }
    
    .my-credits-leaderboard .user-credits {
        margin-top: 4px;
    }
    
    .my-credits-table-wrapper {
        overflow-x: auto;
    }
    
    .my-credits-table-wrapper table {
        min-width: 500px;
    }
}

/* Animation for credit updates */
.credits-amount {
    transition: all 0.3s ease;
}

.credits-amount.updated {
    animation: creditUpdate 0.6s ease;
}

@keyframes creditUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); color: #28a745; }
    100% { transform: scale(1); }
}

/* Button styles */
.update-credits-btn {
    transition: all 0.2s ease;
}

.update-credits-btn:hover:not(:disabled) {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.update-credits-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Redeem Credits Styles */
.my-redeem-credits {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.my-redeem-credits .current-balance {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.my-redeem-credits .current-balance h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.my-redeem-credits .credits-amount {
    color: #28a745;
    font-weight: bold;
    font-size: 20px;
}

.my-redeem-credits .redeem-options {
    margin-top: 20px;
}

.my-redeem-credits .redeem-options h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.my-redeem-credits .redeem-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.my-redeem-credits .redeem-option.available {
    background: #f0f8f0;
    border-color: #28a745;
}

.my-redeem-credits .redeem-option.unavailable {
    background: #f8f8f8;
    border-color: #ccc;
    opacity: 0.7;
}

.my-redeem-credits .reward-info {
    flex: 1;
}

.my-redeem-credits .reward-info h5 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.my-redeem-credits .reward-description {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 14px;
}

.my-redeem-credits .reward-cost {
    margin: 0;
    font-weight: bold;
    color: #28a745;
    font-size: 14px;
}

.my-redeem-credits .redeem-form {
    margin: 0;
}

.my-redeem-credits .redeem-button {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.my-redeem-credits .redeem-button:hover {
    background: #218838;
}

.my-redeem-credits .insufficient-credits {
    margin: 0;
    color: #dc3545;
    font-style: italic;
    font-size: 14px;
}

.my-redeem-credits .no-options {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* Redemption History Styles */
.my-redemption-history {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.my-redemption-history h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.my-redemption-history .redemption-list {
    margin-top: 15px;
}

.my-redemption-history .redemption-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.my-redemption-history .redemption-item:last-child {
    border-bottom: none;
}

.my-redemption-history .redemption-date {
    color: #666;
    font-size: 14px;
}

.my-redemption-history .redemption-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.my-redemption-history .redemption-reward {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.my-redemption-history .redemption-cost {
    color: #dc3545;
    font-size: 12px;
    font-weight: 600;
}

.my-redemption-history .no-redemptions {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* Notices Styles */
.myplugin-notices {
    margin: 15px 0;
}

.myplugin-notices .notice {
    padding: 12px;
    margin: 5px 0;
    border-left: 4px solid;
    background: #fff;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.myplugin-notices .notice-success {
    border-left-color: #46b450;
    background: #f7fff7;
}

.myplugin-notices .notice-error {
    border-left-color: #dc3232;
    background: #fff7f7;
}

.myplugin-notices .notice-warning {
    border-left-color: #ffb900;
    background: #fffbf0;
}

.myplugin-notices .notice-info {
    border-left-color: #00a0d2;
    background: #f0f8ff;
}

/* Admin Redeem Options Styles */
.redeem-option-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.redeem-option-row input {
    margin-right: 10px;
}

.redeem-option-row .remove-redeem-option {
    margin-left: 10px;
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

.redeem-option-row .remove-redeem-option:hover {
    background: #c82333;
}

#add-redeem-option {
    margin-top: 10px;
    background: #28a745;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

#add-redeem-option:hover {
    background: #218838;
}

/* Responsive Design for Redeem */
@media (max-width: 768px) {
    .my-redeem-credits .redeem-option {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .my-redeem-credits .redeem-form {
        margin-top: 10px;
        width: 100%;
    }
    
    .my-redeem-credits .redeem-button {
        width: 100%;
    }
    
    .my-redemption-history .redemption-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .my-redemption-history .redemption-details {
        align-items: flex-start;
        margin-top: 5px;
    }
    
    .redeem-option-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .redeem-option-row input {
        margin-bottom: 5px;
        width: 100%;
    }
}

/* Social Media Rewards Styles */
.my-social-follow-buttons,
.my-social-share-buttons,
.my-social-rewards-info {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}

.my-social-follow-buttons h4,
.my-social-share-buttons h4,
.my-social-rewards-info h3 {
    margin: 0 0 15px 0;
    color: #0073aa;
    font-size: 18px;
}

.credits-info {
    margin: 10px 0;
    padding: 10px;
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
    font-weight: 500;
}

.social-buttons-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.social-button {
    display: inline-block;
    margin: 5px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.social-button a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    text-align: center;
    min-width: 120px;
}

.social-button.facebook a {
    background: #1877f2;
}

.social-button.twitter a {
    background: #1da1f2;
}

.social-button.instagram a {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}

.social-button.linkedin a {
    background: #0077b5;
}

.social-button.youtube a {
    background: #ff0000;
}

.social-button.followed,
.social-button.shared {
    background: #28a745 !important;
}

.social-button.followed span,
.social-button.shared span {
    display: block;
    padding: 12px 16px;
    color: white;
    font-weight: 500;
    text-align: center;
    min-width: 120px;
}

.platform-icon {
    font-size: 18px;
    margin-right: 8px;
}

.platform-name {
    font-size: 14px;
}

.credits-reward {
    display: block;
    font-size: 12px;
    margin-top: 4px;
    opacity: 0.9;
}

.login-notice {
    margin: 15px 0 0 0;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
    text-align: center;
}

.reward-section {
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
}

.reward-section h4 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 16px;
}

.user-stats {
    margin: 10px 0 0 0;
    padding: 8px 12px;
    background: #e7f3ff;
    border-radius: 4px;
    font-weight: 500;
    color: #0073aa;
}

/* Notification Styles */
#myplugin-notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.myplugin-notification {
    margin: 10px 0;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
    animation: slideIn 0.3s ease;
}

.myplugin-notification.notification-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.myplugin-notification.notification-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.myplugin-notification.notification-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.notification-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.notification-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Social Media Responsive Design */
@media (max-width: 768px) {
    .social-buttons-container {
        flex-direction: column;
    }
    
    .social-button {
        width: 100%;
        margin: 5px 0;
    }
    
    .social-button a,
    .social-button span {
        min-width: auto;
        width: 100%;
    }
    
    #myplugin-notifications {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

/* Shortcode Examples Styles */
.shortcode-examples {
    margin: 20px 0;
}

.shortcode-item {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.shortcode-item h5 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 16px;
}

.shortcode-item code {
    display: block;
    background: #2c3e50;
    color: #ecf0f1;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin: 10px 0;
    word-break: break-all;
}

.shortcode-item .description {
    margin: 10px 0 0 0;
    color: #666;
    font-style: italic;
}
