/* Modern Frontend Styles for Referral Woo */

/* Variables */
:root {
    --refwoo-primary: #2563eb;
    --refwoo-primary-hover: #1d4ed8;
    --refwoo-success: #10b981;
    --refwoo-warning: #f59e0b;
    --refwoo-text: #1f2937;
    --refwoo-text-light: #6b7280;
    --refwoo-bg: #ffffff;
    --refwoo-bg-alt: #f9fafb;
    --refwoo-border: #e5e7eb;
    --refwoo-radius: 12px;
    --refwoo-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Card Container */
.refwoo-card {
    background: var(--refwoo-bg);
    border: 1px solid var(--refwoo-border);
    border-radius: var(--refwoo-radius);
    box-shadow: var(--refwoo-shadow);
    overflow: hidden;
    margin-bottom: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--refwoo-text);
    max-width: 600px;
}

.refwoo-card-header {
    background: var(--refwoo-bg-alt);
    padding: 20px 24px;
    border-bottom: 1px solid var(--refwoo-border);
}

.refwoo-card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--refwoo-text);
}

.refwoo-subtitle {
    margin: 4px 0 0;
    font-size: 0.875rem;
    color: var(--refwoo-text-light);
}

.refwoo-card-body {
    padding: 24px;
}

/* Form Fields */
.refwoo-field-group {
    margin-bottom: 20px;
}

.refwoo-field-group:last-child {
    margin-bottom: 0;
}

.refwoo-field-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--refwoo-text);
}

/* Code Display */
.refwoo-code-display {
    background: var(--refwoo-bg-alt);
    border: 1px dashed var(--refwoo-border);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    font-family: monospace;
    font-size: 1.25rem;
    letter-spacing: 1px;
    color: var(--refwoo-primary);
    transition: all 0.2s;
}

.refwoo-code-display.highlight {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.refwoo-code-display:hover {
    border-color: var(--refwoo-primary);
}

/* Input Group */
.refwoo-input-group {
    display: flex;
    gap: 8px;
}

.refwoo-input-copy {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--refwoo-border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--refwoo-text);
    background: var(--refwoo-bg);
    transition: border-color 0.2s;
}

.refwoo-input-copy:focus {
    outline: none;
    border-color: var(--refwoo-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Buttons */
.refwoo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    gap: 6px;
}

.refwoo-btn-primary {
    background: var(--refwoo-primary);
    color: white;
}

.refwoo-btn-primary:hover {
    background: var(--refwoo-primary-hover);
    transform: translateY(-1px);
}

.refwoo-btn-primary:active {
    transform: translateY(0);
}

/* Stats Grid */
.refwoo-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.refwoo-stat-item {
    background: var(--refwoo-bg-alt);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
}

.refwoo-stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--refwoo-text-light);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.refwoo-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--refwoo-text);
}

/* Status Badges */
.refwoo-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-pending {
    background: #fee2e2;
    color: #991b1b;
}

/* Progress Bar */
.refwoo-progress-wrapper {
    margin-bottom: 24px;
}

.refwoo-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--refwoo-text-light);
    margin-bottom: 8px;
}

.refwoo-progress-bar {
    height: 10px;
    background: var(--refwoo-border);
    border-radius: 999px;
    overflow: hidden;
}

.refwoo-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--refwoo-primary), #60a5fa);
    border-radius: 999px;
    transition: width 1s ease-in-out;
}

/* Notices */
.refwoo-notice {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid transparent;
}

.refwoo-notice-warning {
    background: #fffbeb;
    color: #92400e;
    border-left-color: #f59e0b;
}

.refwoo-notice p {
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .refwoo-input-group {
        flex-direction: column;
    }
    
    .refwoo-btn {
        width: 100%;
    }
    
    .refwoo-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Checkout Field Styles */
.refwoo-checkout-field-wrapper {
    margin: 20px 0;
}

.refwoo-card-simple {
    background: var(--refwoo-bg);
    border: 1px solid var(--refwoo-border);
    border-radius: var(--refwoo-radius);
    overflow: hidden;
}

.refwoo-card-header-simple {
    background: var(--refwoo-bg-alt);
    padding: 12px 16px;
    border-bottom: 1px solid var(--refwoo-border);
}

.refwoo-card-header-simple h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--refwoo-text);
}

.refwoo-card-body-simple {
    padding: 16px;
}

.refwoo-input-styled .woocommerce-input-wrapper input.input-text {
    border: 1px solid var(--refwoo-border);
    border-radius: 8px;
    padding: 10px;
    transition: all 0.2s;
}

.refwoo-input-styled .woocommerce-input-wrapper input.input-text:focus {
    border-color: var(--refwoo-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
