/**
 * NV Referral System - Styles
 * Version: 3.1.0
 */

/* ========================================
   GLOBAL STYLES
======================================== */

.nvrl-container {
    max-width: 100%;
    margin: 0 auto;
}

.nvrl-section {
    background: #f9f9f9;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ========================================
   DASHBOARD STATS
======================================== */

.nvrl-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.nvrl-stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #ddd;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.nvrl-stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
    margin: 10px 0;
}

.nvrl-stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   REFERRAL LINK SECTION
======================================== */

.nvrl-link-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.nvrl-link-section h3 {
    color: #fff !important;
    margin-top: 0;
}

.nvrl-ref-code {
    background: rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.nvrl-ref-code-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.nvrl-ref-code-value {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
}

.nvrl-link-wrapper {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.nvrl-link-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    font-size: 14px;
    background: rgba(255,255,255,0.9);
    color: #333;
}

.nvrl-copy-btn {
    padding: 12px 25px;
    background: #fff;
    color: #667eea;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.nvrl-copy-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.nvrl-copy-btn.copied {
    background: #10b981;
    color: #fff;
}

/* ========================================
   SOCIAL SHARE BUTTONS
======================================== */

.nvrl-share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.nvrl-share-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.nvrl-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.nvrl-share-twitter {
    background: #1da1f2;
    color: #fff;
}

.nvrl-share-facebook {
    background: #4267B2;
    color: #fff;
}

.nvrl-share-line {
    background: #00B900;
    color: #fff;
}

.nvrl-share-email {
    background: #ea4335;
    color: #fff;
}

.nvrl-share-whatsapp {
    background: #25D366;
    color: #fff;
}

/* ========================================
   TIPS SECTION
======================================== */

.nvrl-tips {
    background: #fff3cd;
    padding: 20px;
    border-radius: 5px;
    border-left: 4px solid #ffc107;
    margin: 20px 0;
}

.nvrl-tips h4 {
    margin-top: 0;
    color: #856404;
}

.nvrl-tips ul {
    margin: 10px 0;
    padding-left: 20px;
}

.nvrl-tips li {
    margin: 8px 0;
    color: #856404;
}

/* ========================================
   ACTIVITY TABLE
======================================== */

.nvrl-activity-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nvrl-activity-table thead {
    background: #667eea;
    color: #fff;
}

.nvrl-activity-table th,
.nvrl-activity-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.nvrl-activity-table tbody tr:hover {
    background: #f8f9fa;
}

.nvrl-activity-table tbody tr:last-child td {
    border-bottom: none;
}

.nvrl-no-activity {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

/* ========================================
   PAYOUT SECTION
======================================== */

.nvrl-balance-card {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.nvrl-balance-card h3 {
    color: #fff !important;
    margin: 0 0 10px 0;
}

.nvrl-balance-amount {
    font-size: 48px;
    font-weight: bold;
    margin: 15px 0;
}

.nvrl-payout-form {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nvrl-form-table {
    width: 100%;
    border-collapse: collapse;
}

.nvrl-form-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    width: 30%;
    vertical-align: top;
    padding-top: 15px;
}

.nvrl-form-table td {
    padding: 12px 15px;
}

.nvrl-form-table input[type="text"],
.nvrl-form-table input[type="number"],
.nvrl-form-table select {
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.nvrl-form-table input[type="text"]:focus,
.nvrl-form-table input[type="number"]:focus,
.nvrl-form-table select:focus {
    border-color: #667eea;
    outline: none;
}

.nvrl-payout-note {
    background: #fff3cd;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #ffc107;
    margin: 15px 0;
    color: #856404;
}

.nvrl-submit-btn {
    background: #667eea;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.nvrl-submit-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ========================================
   PAYOUT HISTORY TABLE
======================================== */

.nvrl-payout-history {
    margin: 30px 0;
}

.nvrl-status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.nvrl-status-pending {
    background: #ffc107;
    color: #856404;
}

.nvrl-status-approved {
    background: #10b981;
    color: #fff;
}

.nvrl-status-rejected {
    background: #ef4444;
    color: #fff;
}

/* ========================================
   MESSAGES
======================================== */

.nvrl-success {
    background: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-radius: 5px;
    border-left: 4px solid #28a745;
    margin: 20px 0;
}

.nvrl-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 5px;
    border-left: 4px solid #dc3545;
    margin: 20px 0;
}

.nvrl-error ul {
    margin: 5px 0;
    padding-left: 20px;
}

/* ========================================
   ADMIN STYLES
======================================== */

.nvrl-admin-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.nvrl-admin-badge.pending {
    background: #f0ad4e;
    color: #fff;
}

.nvrl-admin-badge.approved {
    background: #5cb85c;
    color: #fff;
}

.nvrl-admin-badge.rejected {
    background: #d9534f;
    color: #fff;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 768px) {
    /* Stats Grid */
    .nvrl-stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .nvrl-stat-value {
        font-size: 28px;
    }

    /* Link Section */
    .nvrl-link-section {
        padding: 20px;
    }

    .nvrl-ref-code-value {
        font-size: 18px;
        letter-spacing: 1px;
    }

    .nvrl-link-wrapper {
        flex-direction: column;
    }

    .nvrl-link-input {
        width: 100%;
        min-width: auto;
    }

    .nvrl-copy-btn {
        width: 100%;
    }

    /* Share Buttons */
    .nvrl-share-buttons {
        flex-direction: column;
    }

    .nvrl-share-btn {
        width: 100%;
        min-width: auto;
    }

    /* Balance Card */
    .nvrl-balance-card {
        padding: 20px;
    }

    .nvrl-balance-amount {
        font-size: 36px;
    }

    /* Form Table */
    .nvrl-form-table th,
    .nvrl-form-table td {
        display: block;
        width: 100%;
        padding: 10px;
    }

    .nvrl-form-table th {
        padding-bottom: 5px;
    }

    .nvrl-form-table td {
        padding-top: 5px;
        padding-bottom: 15px;
    }

    .nvrl-form-table input[type="text"],
    .nvrl-form-table input[type="number"],
    .nvrl-form-table select {
        max-width: 100%;
    }

    /* Activity Table */
    .nvrl-activity-table {
        font-size: 14px;
    }

    .nvrl-activity-table th,
    .nvrl-activity-table td {
        padding: 10px 8px;
    }

    /* Section Padding */
    .nvrl-section {
        padding: 15px;
    }

    .nvrl-payout-form {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    /* Further mobile optimizations */
    .nvrl-stat-card {
        padding: 15px;
    }

    .nvrl-stat-value {
        font-size: 24px;
    }

    .nvrl-stat-label {
        font-size: 12px;
    }

    .nvrl-link-section {
        padding: 15px;
    }

    .nvrl-ref-code-value {
        font-size: 16px;
        word-break: break-all;
    }

    .nvrl-balance-amount {
        font-size: 28px;
    }

    .nvrl-activity-table {
        font-size: 12px;
    }

    .nvrl-activity-table th,
    .nvrl-activity-table td {
        padding: 8px 5px;
    }

    /* Hide date column on very small screens */
    .nvrl-activity-table th:first-child,
    .nvrl-activity-table td:first-child {
        display: none;
    }
}

/* ========================================
   UTILITY CLASSES
======================================== */

.nvrl-text-center {
    text-align: center;
}

.nvrl-mb-20 {
    margin-bottom: 20px;
}

.nvrl-mt-20 {
    margin-top: 20px;
}

.nvrl-p-20 {
    padding: 20px;
}

.nvrl-hidden {
    display: none;
}

/* ========================================
   LOADING STATE
======================================== */

.nvrl-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.nvrl-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-radius: 50%;
    border-top-color: transparent;
    animation: nvrl-spin 0.6s linear infinite;
}

@keyframes nvrl-spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   PRINT STYLES
======================================== */

@media print {
    .nvrl-share-buttons,
    .nvrl-copy-btn,
    .nvrl-submit-btn {
        display: none;
    }
}
