/* Adgro Loyalty Launcher - Modern Design */

#adgro-loyalty-launcher {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    z-index: 999999;
    -webkit-font-smoothing: antialiased;
}

#adgro-loyalty-launcher * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Position Classes */
#adgro-loyalty-launcher.adgro-position-bottom-right #adgro-launcher-btn,
#adgro-loyalty-launcher.adgro-position-bottom-right #adgro-loyalty-panel {
    right: 20px;
    left: auto;
}

#adgro-loyalty-launcher.adgro-position-bottom-left #adgro-launcher-btn,
#adgro-loyalty-launcher.adgro-position-bottom-left #adgro-loyalty-panel {
    left: 20px;
    right: auto;
}

/* Launcher Button */
#adgro-launcher-btn {
    position: fixed;
    bottom: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999999;
    color: white;
}

#adgro-launcher-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#adgro-launcher-btn svg {
    width: 26px;
    height: 26px;
}

#adgro-points-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Panel */
#adgro-loyalty-panel {
    position: fixed;
    bottom: 100px;
    width: 380px;
    max-height: 85vh;
    background: #f8f9fa;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    z-index: 999998;
    animation: adgro-slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 420px) {
    #adgro-loyalty-panel {
        width: calc(100vw - 32px);
        right: 16px !important;
        left: 16px !important;
        bottom: 90px;
    }
}

@keyframes adgro-slideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.adgro-panel-header {
    position: relative;
    min-height: 140px;
    background-size: cover;
    background-position: center;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

#adgro-close-panel {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

#adgro-close-panel:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.adgro-header-text {
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.adgro-wave {
    display: block;
    font-size: 22px;
    margin-bottom: 6px;
}

.adgro-header-text h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

/* Panel Body */
.adgro-panel-body {
    padding: 16px;
    max-height: calc(85vh - 140px);
    overflow-y: auto;
}

/* Cards */
.adgro-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.adgro-card:last-child {
    margin-bottom: 0;
}

.adgro-card h4 {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.adgro-card p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 16px;
}

/* Sign Up Card */
.adgro-signup-card {
    text-align: center;
    border: 2px solid var(--adgro-primary, #22c55e);
}

.adgro-signin-link {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
    margin-top: 14px !important;
    margin-bottom: 0 !important;
}

.adgro-signin-link a {
    font-weight: 600;
    text-decoration: none;
}

.adgro-signin-link a:hover {
    text-decoration: underline;
}

/* Buttons */
.adgro-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.adgro-btn-filled {
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.adgro-btn-filled:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    filter: brightness(1.05);
}

.adgro-btn-outline {
    background: transparent;
    border: 2px solid;
}

.adgro-btn-outline:hover {
    opacity: 0.85;
}

/* Points Display */
.adgro-points-display {
    text-align: center;
    padding: 28px 20px;
}

.adgro-points-label {
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 4px;
}

.adgro-points-value {
    display: block;
    font-size: 52px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.adgro-tier-badge {
    display: inline-block;
    padding: 6px 16px;
    background: #f3f4f6;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

/* Toggle Buttons */
.adgro-toggle-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.adgro-toggle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 50px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.adgro-toggle-btn svg {
    width: 18px;
    height: 18px;
}

.adgro-toggle-btn:not(.adgro-toggle-active) {
    opacity: 0.65;
}

.adgro-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.adgro-toggle-btn.adgro-toggle-active {
    opacity: 1;
    transform: scale(1.02);
}

/* Toggle Content */
.adgro-toggle-content {
    animation: adgro-fadeIn 0.3s ease;
}

@keyframes adgro-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ways to Earn List */
.adgro-ways-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.adgro-way-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 12px;
}

.adgro-way-icon {
    font-size: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.adgro-way-info {
    flex: 1;
}

.adgro-way-info strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.adgro-way-info span {
    font-size: 13px;
    color: #6b7280;
}

/* Rewards List */
.adgro-rewards-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.adgro-reward-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 12px;
}

.adgro-reward-info h5 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.adgro-reward-info span {
    font-size: 13px;
    color: #6b7280;
}

.adgro-reward-claim {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.adgro-reward-claim:hover {
    filter: brightness(1.05);
}

.adgro-reward-claim:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Info Message */
.adgro-info-msg {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
    margin: 0 !important;
}

.adgro-loading {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
}

/* Referral Box */
.adgro-referral-box {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.adgro-referral-box input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 13px;
    color: #374151;
    background: #f9fafb;
}

.adgro-referral-box button {
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.adgro-referral-box button:hover {
    filter: brightness(1.05);
}

/* Account Page Styles */
.adgro-account-loyalty {
    max-width: 800px;
}

.adgro-account-loyalty h2 {
    margin-bottom: 24px;
    font-size: 24px;
}

.adgro-account-loyalty h3 {
    margin: 32px 0 16px;
    font-size: 18px;
}

.adgro-points-card {
    padding: 32px;
    border-radius: 16px;
    color: white;
    text-align: center;
}

.adgro-points-card .adgro-label {
    display: block;
    opacity: 0.9;
    font-size: 14px;
    margin-bottom: 8px;
}

.adgro-points-card .adgro-value {
    font-size: 48px;
    font-weight: 700;
}

.adgro-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.adgro-history-table th,
.adgro-history-table td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.adgro-history-table th {
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
}

.adgro-history-table .positive {
    color: #059669;
    font-weight: 600;
}

.adgro-history-table .negative {
    color: #dc2626;
    font-weight: 600;
}

/* Scrollbar */
.adgro-panel-body::-webkit-scrollbar {
    width: 6px;
}

.adgro-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.adgro-panel-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.adgro-panel-body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
