/* Basic container */
.am-referral-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Top section - code and total */
.am-referral-top-section {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.am-referral-code-section,
.am-referral-total-section {
    flex: 1;
    min-width: 200px;
}

.am-label {
    font-size: 14px;
    margin-bottom: 5px;
    opacity: 0.7;
}

.am-code-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.am-code {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
}

.am-copy-code-btn {
    padding: 5px 15px;
    cursor: pointer;
}

.am-total-amount {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

/* Progress section */
.am-referral-progress-section {
    margin-bottom: 40px;
}

.am-referral-progress-section h3 {
    margin-bottom: 30px;
}

/* Progress line container */
.am-progress-line-container {
    position: relative;
    padding: 60px 0 20px;
    margin-bottom: 3rem;
    margin-top: 2rem;
}

.am-progress-line-wrapper {
    position: relative;
    height: 4px;
}

/* Background line (unfilled) */
.am-progress-line-bg {
    position: absolute;
    width: 100%;
    height: 4px;
    background: var(--am-background-gray, #e0e0e0);
    border-radius: 2px;
}

/* Filled line */
.am-progress-line-fill {
    position: absolute;
    height: 4px;
    background: var(--am-accent-color, #4CAF50);
    border-radius: 2px;
    transition: width 0.5s ease;
    z-index: 1;
}

/* Milestone positioning */
.am-milestone {
    position: absolute;
    transform: translateX(-50%);
    z-index: 10;
}

/* Icon above circle */
.am-milestone-icon {
    position: absolute;
    bottom: 2.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 1.5rem;
    height: 1.5rem;
    z-index: 3;
}

.am-milestone-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Icon colors */
.am-milestone-icon.claimed svg {
    fill: limegreen;
}

.am-milestone-icon.ready svg {
    fill: var(--am-accent-color, #4CAF50);
}

.am-milestone-icon.locked svg {
    fill: red;
}

/* Label above icon */
.am-milestone-label {
    display: block;
    position: absolute;
    bottom: 4.25rem;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 1.125rem;
}

/* Circle styles */
.am-milestone-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid var(--am-background-gray, #e0e0e0);
    background: var(--am-background-gray);
    position: relative;
    top: -8px;
    z-index: 10;
    transition: all 0.5s ease;
}

.am-milestone-circle.completed {
    background: var(--am-accent-color, #4CAF50);
    border-color: var(--am-accent-color, #4CAF50);
}

.am-milestone-circle.ready, .am-milestone-circle.claimed {
    background: var(--am-accent-color);
    border-color: var(--am-accent-color);
}

/*
.am-milestone-circle.claimed {
    background: limegreen;
    border-color: limegreen;
}
*/

.am-milestone-circle.locked {
    border-color: var(--am-background-gray, #e0e0e0);
}

/* Tooltip on hover */
.am-milestone-tooltip {
    position: absolute;
    bottom: 95px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
    z-index: 4;
}

.am-milestone:hover .am-milestone-tooltip {
    opacity: 1;
}

/* Next reward info */
.am-next-reward-info {
    margin-top: 20px;
    padding: 15px;
    border-left: 3px solid var(--am-accent-color, #4CAF50);
}

.am-next-reward-info p {
    margin: 0;
}

/* History section */
.am-referral-history-section {
    margin-bottom: 40px;
}

.am-no-history {
    opacity: 0.6;
    font-style: italic;
}

/* Info section */
.am-referral-info-section {
    padding: 20px;
    background: var(--am-background-gray);
    border-radius: 4px;
}

.am-referral-info-section h3 {
    margin-top: 0;
}

/* Messages */
.am-referral-message {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
}

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

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

/* Copy button feedback */
.am-copy-code-btn.am-copied {
    background: var(--am-accent-color, #4CAF50);
    color: white;
}

/* Claim button */
.am-claim-btn {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    z-index: 5;
}

.am-claim-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* History list */
.am-history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.am-history-item {
    padding: 15px;
    border-left: 3px solid limegreen;
}

.am-history-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.am-history-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.am-history-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: limegreen;
}

.am-history-amount {
    font-weight: bold;
    color: limegreen;
}

.am-history-desc {
    flex: 1;
}

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

.am-history-code,
.am-history-info {
    margin-top: 10px;
    padding: 10px;
    padding-bottom: 0px;
    border-radius: 4px;
    font-size: 14px;
}

.am-history-code strong {
    color: var(--am-accent-color, #4CAF50);
    letter-spacing: 1px;
}

.am-copy-history-code {
    padding: 3px 10px;
    font-size: 12px;
    margin-left: 10px;
    cursor: pointer;
}