/**
 * Free Reward Users Styles
 * 
 * @package Advanced_Checkout
 * @version 1.8.0
 */

/* Admin Styles */
.free-reward-user-data {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.free-reward-user-data h3 {
    color: #333;
    margin-top: 0;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.free-reward-user-data .form-table {
    width: 100%;
    border-collapse: collapse;
}

.free-reward-user-data .form-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border: 1px solid #e1e1e1;
    width: 200px;
}

.free-reward-user-data .form-table td {
    padding: 12px;
    border: 1px solid #e1e1e1;
    background: #fff;
}

.approval-status {
    padding: 4px 8px;
    border-radius: 3px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 11px;
    display: inline-block;
}

.status-pending_first_approval {
    background: #fff3cd;
    color: #856404;
}

.status-pending_challenge_approval {
    background: #d1ecf1;
    color: #0c5460;
}

.status-challenge_assigned {
    background: #d4edda;
    color: #155724;
}

.approval-history {
    max-height: 200px;
    overflow-y: auto;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #e1e1e1;
}

.approval-entry {
    margin-bottom: 10px;
    padding: 8px;
    background: #fff;
    border-left: 3px solid #007cba;
    border-radius: 3px;
}

.approval-entry:last-child {
    margin-bottom: 0;
}

.approval-actions {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #e1e1e1;
}

.approval-actions p {
    margin: 0 0 10px 0;
    color: #555;
}

.approval-notes {
    margin-top: 15px;
}

.approval-notes label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.approval-notes textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 8px;
    font-family: inherit;
    resize: vertical;
}

/* Frontend Form Styles */
.ccx-free-reward {
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.ccx-free-reward *,
.ccx-free-reward *::before,
.ccx-free-reward *::after {
    box-sizing: border-box;
}

.ccx-free-reward {
    --ccx-deep-ocean: #0F1A2F;
    --ccx-neon: #00E0E0;
    --ccx-teal: #16B3B3;
    --ccx-white: #F5F9FB;
    --ccx-ice: #CFE6EA;
    --ccx-radius: 12px;
    --ccx-s1: 8px;
    --ccx-s2: 16px;
    --ccx-s3: 24px;
    --ccx-s4: 32px;
    --ccx-maxw: 1120px;
    color: var(--ccx-white);
    padding: clamp(24px, 4vw, 64px) 16px;
    width: 100%;
    border-radius: 12px;
}

.ccx-free-reward .ccx-inner {
    max-width: var(--ccx-maxw);
    margin: 0 auto;
    display: grid;
    gap: clamp(20px, 3vw, var(--ccx-s4));
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
}

@media (max-width: 1024px) {
    .ccx-free-reward .ccx-inner {
        grid-template-columns: minmax(0, 1fr);
    }
}

.ccx-free-reward .ccx-hero-title {
    font-family: "Exo 2", Inter, sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 6vw, 56px);
    line-height: 1.1;
    margin: 0 0 var(--ccx-s2);
    background: linear-gradient(135deg, #00E0E0, #16B3B3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ccx-free-reward .ccx-hero-desc {
    font-size: clamp(15px, 2.2vw, 18px);
    line-height: 1.5;
    margin: 0 0 var(--ccx-s3);
    max-width: 65ch;
    color: rgba(245, 249, 251, 0.9);
}

.ccx-free-reward .ccx-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--ccx-s3);
}

.ccx-free-reward .ccx-benefits li {
    display: flex;
    align-items: center;
    gap: var(--ccx-s1);
    margin-bottom: var(--ccx-s1);
    font-size: 14px;
    color: rgba(245, 249, 251, 0.85);
}

.ccx-free-reward .ccx-benefits li::before {
    content: "✓";
    color: var(--ccx-neon);
    font-weight: bold;
    font-size: 16px;
}

.ccx-free-reward .ccx-media {
    position: relative;
    width: 100%;
    border-radius: var(--ccx-radius);
    overflow: hidden;
    background: linear-gradient(120deg, rgba(0, 224, 224, 0.15), rgba(22, 179, 179, 0.05));
    border: 1px solid rgba(207, 230, 234, 0.35);
    aspect-ratio: 16/9;
}

@supports not (aspect-ratio: 16/9) {
    .ccx-free-reward .ccx-media::before {
        content: "";
        display: block;
        padding-top: 56.25%;
    }
}

.ccx-free-reward .ccx-media > * {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ccx-free-reward .ccx-card {
    background: rgba(6, 12, 24, 0.55);
    border: 1px solid rgba(207, 230, 234, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    border-radius: var(--ccx-radius);
    padding: clamp(18px, 3.5vw, 32px);
    backdrop-filter: blur(6px);
}

.ccx-free-reward .ccx-card-title {
    font-family: "Exo 2", Inter, sans-serif;
    font-weight: 600;
    font-size: clamp(20px, 3.6vw, 32px);
    margin: 0 0 var(--ccx-s2);
}

.ccx-free-reward .ccx-card-sub {
    margin: 0 0 var(--ccx-s3);
    font-size: clamp(14px, 2vw, 16px);
    color: rgba(245, 249, 251, 0.85);
}

.ccx-free-reward .ccx-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--ccx-s2);
}

.ccx-free-reward .ccx-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ccx-s2);
}

@media (max-width: 680px) {
    .ccx-free-reward .ccx-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

.ccx-free-reward .ccx-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ccx-free-reward .ccx-label {
    font-size: 14px;
    color: rgba(245, 249, 251, 0.8);
    text-align: left;
    font-weight: 500;
}

.ccx-free-reward .ccx-input,
.ccx-free-reward .ccx-select,
.ccx-free-reward .ccx-textarea {
    width: 100%;
    background: rgba(15, 26, 47, 0.7);
    border: 1px solid rgba(207, 230, 234, 0.25);
    color: var(--ccx-white);
    border-radius: 10px;
    padding: 13px 14px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.ccx-free-reward .ccx-input::placeholder,
.ccx-free-reward .ccx-textarea::placeholder {
    color: rgba(245, 249, 251, 0.55);
}

.ccx-free-reward .ccx-input:focus,
.ccx-free-reward .ccx-select:focus,
.ccx-free-reward .ccx-textarea:focus {
    border-color: var(--ccx-neon);
    box-shadow: 0 0 0 3px rgba(0, 224, 224, 0.18);
}

.ccx-free-reward .ccx-textarea {
    min-height: 80px;
    resize: vertical;
}

.ccx-free-reward .ccx-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 2px;
    text-align: left;
}

.ccx-free-reward .ccx-check .ccx-checkbox {
    margin-top: 3px;
}

.ccx-free-reward .ccx-btn {
    width: 100%;
    appearance: none;
    border: none;
    background: linear-gradient(90deg, var(--ccx-neon), var(--ccx-teal));
    color: #06212A;
    font-family: Inter, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1;
    padding: 14px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.04s, filter 0.2s;
}

.ccx-free-reward .ccx-btn:active {
    transform: translateY(1px);
}

.ccx-free-reward .ccx-btn:hover {
    filter: brightness(1.05);
}

.ccx-free-reward .ccx-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ccx-free-reward .ccx-msg {
    margin-top: var(--ccx-s2);
    min-height: 1.2em;
    font-size: 14px;
}

.ccx-free-reward .ccx-msg.-error {
    color: #EA4444;
}

.ccx-free-reward .ccx-msg.-ok {
    color: #62D47A;
}

.ccx-free-reward .ccx-legal {
    margin-top: var(--ccx-s2);
    font-size: 12px;
    color: rgba(245, 249, 251, 0.65);
}

.ccx-free-reward .ccx-legal a {
    color: var(--ccx-neon);
    text-decoration: underline;
}

.ccx-free-reward .ccx-warning {
    margin-top: var(--ccx-s2);
    padding: 14px 16px;
    background: rgba(255, 176, 59, 0.1);
    border: 1px solid rgba(255, 176, 59, 0.35);
    border-radius: 10px;
    font-size: 13px;
    color: #FFB03B;
    line-height: 1.5;
    text-align: left;
}

.ccx-free-reward .ccx-section-title {
    font-family: "Exo 2", Inter, sans-serif;
    font-weight: 600;
    font-size: 18px;
    margin: var(--ccx-s3) 0 var(--ccx-s2) 0;
    color: var(--ccx-neon);
    border-bottom: 1px solid rgba(207, 230, 234, 0.2);
    padding-bottom: var(--ccx-s1);
}

.ccx-free-reward .ccx-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--ccx-neon);
    font-size: 14px;
}

.ccx-free-reward .ccx-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 224, 224, 0.3);
    border-top: 2px solid var(--ccx-neon);
    border-radius: 50%;
    animation: ccx-spin 1s linear infinite;
}

@keyframes ccx-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
