/**
 * Rust Store Frontend Styles
 */

/* Checkout Fields */
.rust-store-field input {
    font-family: monospace;
}

.rust-store-field .description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Account Cards */
.rust-store-account {
    max-width: 800px;
}

.rust-store-account-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.account-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.account-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.account-card-header h3 {
    margin: 0;
    font-size: 16px;
}

.steam-card .account-card-header {
    background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%);
    color: #fff;
}

.discord-card .account-card-header {
    background: linear-gradient(135deg, #5865F2 0%, #7289da 100%);
    color: #fff;
}

.steam-icon,
.discord-icon {
    flex-shrink: 0;
}

.account-card-body {
    padding: 20px;
}

.linked-account {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.account-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.account-info {
    flex: 1;
}

.account-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
}

.account-id {
    display: block;
    font-family: monospace;
    font-size: 12px;
    color: #666;
}

.not-linked {
    color: #666;
    margin-bottom: 15px;
}

.steam-login-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1b2838 !important;
    color: #fff !important;
    border: none !important;
}

.steam-login-button:hover {
    background: #2a475e !important;
}

.discord-login-button {
    background: #5865F2 !important;
    color: #fff !important;
    border: none !important;
}

.discord-login-button:hover {
    background: #4752c4 !important;
}

.button-icon {
    width: 20px;
    height: 20px;
}

.unlink-button {
    font-size: 12px;
    padding: 5px 10px;
}

/* Help Text */
.rust-store-help-text {
    background: #f0f6fc;
    border: 1px solid #c8dae8;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.rust-store-help-text h3 {
    margin-top: 0;
    font-size: 14px;
}

.rust-store-help-text ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.rust-store-help-text li {
    margin-bottom: 5px;
}

/* My Perks */
.rust-store-my-perks {
    max-width: 900px;
}

.rust-store-notice {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.rust-store-notice.notice-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
}

.rust-store-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rust-store-empty-state .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #ccc;
}

.rust-store-empty-state h3 {
    margin: 15px 0 10px;
}

.rust-store-empty-state p {
    color: #666;
    margin-bottom: 20px;
}

/* Entitlements List */
.entitlements-list {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.entitlement-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.entitlement-card.status-active {
    border-left: 4px solid #28a745;
}

.entitlement-card.status-expired {
    border-left: 4px solid #6c757d;
    opacity: 0.8;
}

.entitlement-card.status-revoked {
    border-left: 4px solid #dc3545;
    opacity: 0.8;
}

.entitlement-card.status-pending {
    border-left: 4px solid #ffc107;
}

.entitlement-card.status-failed {
    border-left: 4px solid #dc3545;
}

.entitlement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.entitlement-name {
    margin: 0;
    font-size: 16px;
}

.entitlement-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

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

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

.entitlement-status.status-expired {
    background: #e2e3e5;
    color: #383d41;
}

.entitlement-status.status-revoked {
    background: #f8d7da;
    color: #721c24;
}

.entitlement-status.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.entitlement-details {
    padding: 15px 20px;
}

.detail-row {
    display: flex;
    margin-bottom: 8px;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-label {
    flex: 0 0 100px;
    color: #666;
    font-size: 13px;
}

.detail-value {
    flex: 1;
    font-size: 13px;
}

.days-left {
    color: #666;
    font-size: 12px;
}

.entitlement-actions {
    padding: 10px 20px 15px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.entitlement-actions .button {
    font-size: 12px;
}

/* Past entitlements */
.entitlements-past .entitlement-card {
    opacity: 0.7;
}

.entitlements-past .entitlement-header {
    background: #f0f0f0;
}

/* =====================================
   Checkout Enhancements
   ===================================== */

/* Checkout Header */
.rust-store-checkout-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    color: #fff;
}

.rust-checkout-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.rust-checkout-icon {
    background: rgba(205, 127, 50, 0.2);
    border-radius: 12px;
    padding: 12px;
    color: #cd7f32;
}

.rust-checkout-title h2 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
}

.rust-checkout-title p {
    margin: 0;
    opacity: 0.7;
    font-size: 14px;
}

.rust-checkout-products {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rust-checkout-product-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 8px;
}

.rust-checkout-product-item .rust-product-thumb {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.rust-checkout-product-item .rust-product-name {
    font-weight: 500;
}

.rust-checkout-product-item .rust-product-qty {
    opacity: 0.7;
}

/* Checkout Steps */
.rust-checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.rust-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.rust-step.active {
    background: #cd7f32;
    opacity: 1;
}

.rust-step.completed {
    background: rgba(40, 167, 69, 0.3);
    opacity: 1;
}

.rust-step .step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-weight: 600;
    font-size: 12px;
}

.rust-step.active .step-number {
    background: rgba(0, 0, 0, 0.2);
}

.rust-step .step-label {
    font-size: 13px;
    font-weight: 500;
}

.rust-step-connector {
    width: 30px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
}

/* Checkout Accounts Container */
.rust-store-checkout-accounts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media screen and (max-width: 768px) {
    .rust-store-checkout-accounts {
        grid-template-columns: 1fr;
    }
}

/* Steam Profile Preview - Dark Theme */
.rust-store-steam-preview {
    background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    color: #fff;
}

.steam-preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.steam-preview-header .steam-icon {
    color: #66c0f4;
}

.steam-preview-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.steam-profile-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
}

.steam-profile-card.loading {
    opacity: 0.6;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.8; }
}

.steam-profile-card .steam-avatar {
    flex-shrink: 0;
}

.steam-profile-card .steam-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 2px solid #66c0f4;
}

.steam-avatar-placeholder {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
}

.steam-profile-card .steam-info {
    flex: 1;
}

.steam-profile-card .steam-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    margin-bottom: 2px;
}

.steam-profile-card .steam-id {
    display: block;
    font-family: monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.steam-profile-card .steam-status {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.steam-profile-card .steam-status.linked,
.steam-profile-card .steam-status.verified {
    background: rgba(40, 167, 69, 0.3);
    color: #90EE90;
}

.steam-profile-card .steam-status.not-linked {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.steam-note {
    margin: 10px 0 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.steam-note a {
    color: #66c0f4;
}

/* Steam Input */
.steam-input-wrapper {
    margin-top: 15px;
}

.steam-id-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-family: monospace;
    font-size: 14px;
    transition: all 0.2s ease;
}

.steam-id-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.steam-id-input:focus {
    outline: none;
    border-color: #66c0f4;
    box-shadow: 0 0 0 3px rgba(102, 192, 244, 0.2);
}

.steam-input-help {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.steam-input-help a {
    color: #66c0f4;
}

/* Discord Section - Dark Theme */
.rust-store-discord-section {
    background: linear-gradient(135deg, #5865F2 0%, #7289da 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    color: #fff;
}

.rust-store-discord-section.optional {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

.discord-preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.discord-preview-header .discord-icon {
    color: #fff;
}

.discord-preview-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.optional-badge {
    font-size: 11px;
    font-weight: 400;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.discord-input-wrapper {
    margin-top: 0;
}

.discord-id-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-family: monospace;
    font-size: 14px;
    transition: all 0.2s ease;
}

.discord-id-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.discord-id-input:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.discord-input-help {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* Server Selection - Dark Theme */
.rust-store-server-selection {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    color: #fff;
}

.server-selection-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.server-selection-header .server-icon {
    color: #cd7f32;
}

.server-selection-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.server-selection-note {
    margin: 0 0 15px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.server-options {
    display: grid;
    gap: 10px;
}

.server-option {
    display: block;
    cursor: pointer;
    margin: 0;
}

.server-option input[type="radio"] {
    display: none;
}

.server-option-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: #fff;
}

.server-option:hover .server-option-content {
    background: rgba(0, 0, 0, 0.3);
}

.server-option.selected .server-option-content,
.server-option input:checked + .server-option-content {
    background: rgba(205, 127, 50, 0.2);
    border-color: #cd7f32;
}

.server-option-icon {
    color: rgba(255, 255, 255, 0.6);
    display: flex;
}

.server-option.selected .server-option-icon,
.server-option input:checked + .server-option-content .server-option-icon {
    color: #cd7f32;
}

.server-option .server-name {
    flex: 1;
    font-weight: 500;
    color: #fff;
}

.server-option .server-check {
    display: none;
    color: #cd7f32;
}

.server-option.selected .server-check,
.server-option input:checked + .server-option-content .server-check {
    display: block;
}

/* Hide optional billing fields styling */
.rust-store-optional-field {
    opacity: 0.7;
}

.rust-store-optional-field label .optional {
    font-size: 11px;
    color: #999;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .rust-store-account-cards {
        grid-template-columns: 1fr;
    }

    .entitlement-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .detail-row {
        flex-direction: column;
    }

    .detail-label {
        font-weight: 500;
        margin-bottom: 2px;
    }

    /* Checkout responsive */
    .rust-store-checkout-header {
        padding: 20px;
    }

    .rust-checkout-banner {
        flex-direction: column;
        text-align: center;
    }

    .rust-checkout-steps {
        flex-wrap: wrap;
    }

    .rust-step-connector {
        display: none;
    }

    .rust-checkout-products {
        flex-direction: column;
    }

    .steam-profile-card {
        flex-direction: column;
        text-align: center;
    }

    .steam-profile-card .steam-info {
        order: 2;
    }

    .steam-profile-card .steam-status {
        order: 3;
    }
}

/* =====================================
   My Account Pages - Shared Styles
   ===================================== */

/* Page Header */
.my-perks-page .page-header,
.rust-account-linking .page-header,
.my-gift-cards-page .page-header {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 25px;
}

.my-perks-page .page-header h2,
.rust-account-linking .page-header h2,
.my-gift-cards-page .page-header h2 {
    color: #fff;
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.my-perks-page .page-header h2 i,
.rust-account-linking .page-header h2 i,
.my-gift-cards-page .page-header h2 i {
    color: #cd7f32;
}

.my-perks-page .page-header p,
.rust-account-linking .page-header p,
.my-gift-cards-page .page-header p {
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    font-size: 14px;
}

/* Section Titles */
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 0;
    border-bottom: none;
}

.section-title i {
    color: #cd7f32;
    font-size: 14px;
}

.section-title h3 {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.count-badge {
    background: rgba(205, 127, 50, 0.2);
    color: #cd7f32;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

.count-badge.muted {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Empty State Card */
.empty-state-card {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
}

.empty-state-card .empty-icon {
    width: 70px;
    height: 70px;
    background: rgba(205, 127, 50, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.empty-state-card .empty-icon i {
    font-size: 28px;
    color: #cd7f32;
}

.empty-state-card h3 {
    color: #fff;
    margin: 0 0 10px;
    font-size: 18px;
}

.empty-state-card p {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 25px;
    font-size: 14px;
}

/* Action Buttons */
.action-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.action-button.primary {
    background: transparent;
    color: #cd7f32;
    border: 1px solid #cd7f32;
}

.action-button.primary:hover {
    background: rgba(205, 127, 50, 0.15);
    color: #daa520;
    border-color: #daa520;
}

.action-button.primary.filled {
    background: #cd7f32;
    color: #fff;
    border: none;
}

.action-button.primary.filled:hover {
    background: #daa520;
}

.action-button.secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.action-button.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Benefits Section */
.benefits-section {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 25px 30px;
    margin-top: 25px;
}

.benefits-section.gift-card-tips {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(205, 127, 50, 0.2);
}

.benefits-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.benefits-header i {
    color: #cd7f32;
    font-size: 20px;
}

.benefits-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

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

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.benefit-icon {
    width: 40px;
    height: 40px;
    background: rgba(205, 127, 50, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.benefit-icon i {
    color: #cd7f32;
    font-size: 16px;
}

.benefit-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.benefit-text strong {
    color: #fff;
    font-size: 13px;
}

.benefit-text span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    line-height: 1.4;
}

/* =====================================
   Gift Cards Page Styles
   ===================================== */

.my-gift-cards-page {
    /* No max-width - let content fill available space */
}

.gift-cards-section {
    margin-bottom: 30px;
}

.gift-cards-grid {
    display: grid;
    gap: 15px;
}

/* Gift Card Card */
.gift-card-card {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.gift-card-card:hover {
    border-color: rgba(205, 127, 50, 0.4);
    background: rgba(35, 35, 35, 0.7);
}

.gift-card-card .card-status-bar {
    height: 3px;
    background: #10b981;
}

.gift-card-card.used .card-status-bar {
    background: #f59e0b;
}

.gift-card-card.disabled .card-status-bar {
    background: #ef4444;
}

.gift-card-card.expired .card-status-bar {
    background: #6b7280;
}

.gift-card-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.gift-card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gift-card-code {
    font-family: 'Courier New', monospace;
    font-size: 15px;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gift-card-code i {
    color: #cd7f32;
    font-size: 14px;
}

.gift-card-recipient,
.gift-card-date {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 8px;
}

.gift-card-recipient i,
.gift-card-date i {
    font-size: 12px;
    width: 14px;
}

.gift-card-expiry {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 8px;
}

.gift-card-expiry i {
    font-size: 12px;
    width: 14px;
}

.gift-card-expiry.expiring-soon {
    color: #f59e0b;
}

.gift-card-expiry.is-expired {
    color: #6b7280;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge i {
    font-size: 10px;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.status-badge.used {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.status-badge.disabled {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.status-badge.expired {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

/* Card Body - Balance */
.gift-card-card .card-body {
    padding: 0 20px 16px;
}

.gift-card-balance {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gift-card-balance .balance-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gift-card-balance .balance-amount {
    font-size: 24px;
    font-weight: 700;
    color: #10b981;
}

.gift-card-card.used .gift-card-balance .balance-amount {
    color: #f59e0b;
}

.gift-card-card.disabled .gift-card-balance .balance-amount {
    color: #ef4444;
}

.gift-card-card.expired .gift-card-balance .balance-amount {
    color: #6b7280;
}

.gift-card-balance .balance-original {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

/* Notice Card */
.notice-card {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.notice-card.warning {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.notice-icon {
    width: 44px;
    height: 44px;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notice-icon i {
    font-size: 18px;
    color: #f59e0b;
}

.notice-content {
    flex: 1;
}

.notice-content strong {
    color: #fff;
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.notice-content p {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 12px;
    font-size: 13px;
}

.notice-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #cd7f32;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.notice-action:hover {
    color: #daa520;
}

/* =====================================
   Perks Page Specific Styles
   ===================================== */

.my-perks-page {
    /* No max-width - let content fill available space */
}

.perks-section {
    margin-bottom: 30px;
}

.entitlements-grid {
    display: grid;
    gap: 15px;
}

/* Entitlement Card - Dark Theme */
.entitlement-card {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.entitlement-card:hover {
    border-color: rgba(205, 127, 50, 0.4);
    background: rgba(35, 35, 35, 0.7);
}

.entitlement-card .card-status-bar {
    height: 3px;
    background: #10b981;
}

.entitlement-card.expired .card-status-bar {
    background: #6b7280;
}

.entitlement-card.revoked .card-status-bar {
    background: #ef4444;
}

.entitlement-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.entitlement-card .product-info h4 {
    margin: 0 0 5px;
    color: #fff;
    font-size: 16px;
}

.entitlement-card .server-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 6px;
}

.entitlement-card .server-name i {
    font-size: 12px;
}

.entitlement-card .card-body {
    padding: 0 20px 16px;
}

.entitlement-card .detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.entitlement-card .detail-item:last-child {
    margin-bottom: 0;
}

.entitlement-card .detail-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 100px;
}

.entitlement-card .detail-label i {
    font-size: 12px;
    width: 14px;
}

.entitlement-card .detail-value {
    color: #fff;
    font-size: 13px;
}

.entitlement-card .detail-value.expiring-soon {
    color: #f59e0b;
}

.entitlement-card .detail-value.subscription {
    color: #10b981;
}

.entitlement-card .time-remaining {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.entitlement-card .time-remaining.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.entitlement-card .card-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.entitlement-card .card-actions .action-button {
    flex: 1;
    min-width: 120px;
    justify-content: center;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
}

/* Join Server - Primary action */
.entitlement-card .card-actions .rust-store-join-server {
    background: transparent;
    color: #10b981;
    border: 1px solid #10b981;
}

.entitlement-card .card-actions .rust-store-join-server:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: #34d399;
}

/* Re-deliver - Secondary action */
.entitlement-card .card-actions .rust-store-redeliver {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.entitlement-card .card-actions .rust-store-redeliver:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.85);
}

/* Re-deliver container and status indicator */
.entitlement-card .card-actions .redeliver-container {
    flex: 1;
    min-width: 120px;
}

.entitlement-card .card-actions .redeliver-container .rust-store-redeliver {
    width: 100%;
}

.redeliver-status {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    min-height: 40px;
}

.redeliver-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.redeliver-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(249, 115, 22, 0.3);
    border-top-color: #f97316;
    border-radius: 50%;
    animation: redeliver-spin 0.8s linear infinite;
    flex-shrink: 0;
}

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

.redeliver-text {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.redeliver-text.connecting {
    color: #f97316;
}

.redeliver-text.delivering {
    color: #f97316;
}

.redeliver-text.success {
    color: #22c55e;
}

.redeliver-text.error {
    color: #ef4444;
}

/* Hide spinner when done */
.redeliver-status.complete .redeliver-spinner {
    display: none;
}

/* Success checkmark icon */
.redeliver-status.complete .redeliver-progress::before {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2322c55e'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* Error icon */
.redeliver-status.error .redeliver-progress::before {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ef4444'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.redeliver-status.error .redeliver-spinner {
    display: none;
}

/* Manage Subscription - Accent action */
.entitlement-card .card-actions .rust-store-manage-subscription {
    background: transparent;
    color: #cd7f32;
    border: 1px solid #cd7f32;
}

.entitlement-card .card-actions .rust-store-manage-subscription:hover {
    background: rgba(205, 127, 50, 0.15);
    color: #daa520;
    border-color: #daa520;
}

/* Stack buttons on mobile */
@media (max-width: 480px) {
    .entitlement-card .card-actions {
        flex-direction: column;
    }

    .entitlement-card .card-actions .action-button {
        min-width: 100%;
    }
}

/* Past entitlements */
.perks-section.past .entitlement-card {
    opacity: 0.7;
}

/* =====================================
   Rust Account Linking Styles
   ===================================== */

.rust-account-linking {
    width: 100%;
}

.account-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.account-section {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.account-section .section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.platform-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-icon.steam {
    background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%);
}

.platform-icon.discord {
    background: linear-gradient(135deg, #5865F2 0%, #7289da 100%);
}

.platform-icon i {
    font-size: 24px;
    color: #fff;
}

.platform-info h3 {
    margin: 0 0 4px;
    color: #fff;
    font-size: 16px;
}

.platform-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.account-section .section-body {
    padding: 20px;
}

.linked-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.linked-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.linked-user .user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

.linked-user .user-avatar.placeholder {
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.linked-user .user-avatar.placeholder i {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.5);
}

.linked-user .user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.linked-user .user-name {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.linked-user .user-id {
    font-family: monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.connection-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.connection-badge.connected {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.not-linked-state p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin: 0 0 15px;
}

.action-button.connect {
    width: 100%;
    justify-content: center;
}

.action-button.connect.steam {
    background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%);
    color: #fff;
}

.action-button.connect.steam:hover {
    background: linear-gradient(135deg, #2a475e 0%, #3d6a8c 100%);
}

.action-button.connect.discord {
    background: linear-gradient(135deg, #5865F2 0%, #7289da 100%);
    color: #fff;
}

.action-button.connect.discord:hover {
    background: linear-gradient(135deg, #6773f5 0%, #8a9de0 100%);
}

.action-button.unlink {
    width: 100%;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

.action-button.unlink:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* =====================================
   WooCommerce Coupon Section Styling
   ===================================== */

/* Coupon toggle link */
.woocommerce-form-coupon-toggle {
    margin-bottom: 15px;
}

.woocommerce-form-coupon-toggle .woocommerce-info {
    background: rgba(17, 17, 17, 0.95);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.woocommerce-form-coupon-toggle .woocommerce-info::before {
    color: #f97316;
}

.woocommerce-form-coupon-toggle .woocommerce-info a {
    color: #f97316;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.woocommerce-form-coupon-toggle .woocommerce-info a:hover {
    color: #fb923c;
}

/* Coupon form container */
.checkout_coupon.woocommerce-form-coupon {
    background: rgba(17, 17, 17, 0.95);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.checkout_coupon.woocommerce-form-coupon p:first-child {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
    font-size: 14px;
}

/* Coupon input field */
.checkout_coupon.woocommerce-form-coupon .form-row-first {
    width: 100%;
    float: none;
    margin-bottom: 10px;
}

.checkout_coupon.woocommerce-form-coupon input.input-text,
.checkout_coupon.woocommerce-form-coupon input[name="coupon_code"] {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-family: monospace;
    font-size: 14px;
    transition: all 0.2s ease;
}

.checkout_coupon.woocommerce-form-coupon input.input-text::placeholder,
.checkout_coupon.woocommerce-form-coupon input[name="coupon_code"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.checkout_coupon.woocommerce-form-coupon input.input-text:focus,
.checkout_coupon.woocommerce-form-coupon input[name="coupon_code"]:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

/* Coupon apply button */
.checkout_coupon.woocommerce-form-coupon .form-row-last {
    width: 100%;
    float: none;
}

.checkout_coupon.woocommerce-form-coupon button.button,
.checkout_coupon.woocommerce-form-coupon button[name="apply_coupon"] {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkout_coupon.woocommerce-form-coupon button.button:hover,
.checkout_coupon.woocommerce-form-coupon button[name="apply_coupon"]:hover {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    transform: translateY(-2px);
}

/* Coupon success/error messages */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    background: rgba(17, 17, 17, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    list-style: none;
}

.woocommerce-message::before {
    color: #22c55e;
}

.woocommerce-error {
    border-color: rgba(239, 68, 68, 0.3);
}

.woocommerce-error::before {
    color: #ef4444;
}

.woocommerce-info::before {
    color: #f97316;
}

.woocommerce-error li,
.woocommerce-message li {
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   Checkout Loading State
   ======================================== */

/* Processing state on form */
form.checkout.rust-checkout-processing {
    pointer-events: none;
    position: relative;
}

/* Checkout overlay */
.rust-checkout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: rust-fade-in 0.2s ease;
}

@keyframes rust-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Loader container */
.rust-checkout-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px 60px;
    background: rgba(17, 17, 17, 0.98);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.rust-checkout-loader span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Large spinner for overlay */
.rust-spinner-large {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #f97316;
    border-radius: 50%;
    animation: rust-spin 0.8s linear infinite;
}

/* Small spinner for button */
.rust-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: rust-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

/* Place order button loading state */
#place_order.rust-loading {
    background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%) !important;
    cursor: not-allowed !important;
    opacity: 0.8;
}

#place_order.rust-loading:hover {
    transform: none !important;
}

/* ========================================
   Order Received / Thank You Page
   ======================================== */

/* Order header info (Order number, Date, Email, Total) */
.woocommerce-order-received .woocommerce-order p,
.woocommerce-order-received .entry-content > p {
    color: rgba(255, 255, 255, 0.8);
}

.woocommerce-order-received .woocommerce-order p strong,
.woocommerce-order-received .entry-content > p strong {
    color: #fff;
}

/* Order details section */
.woocommerce-order-received .woocommerce-order-details,
.woocommerce-order-received section.woocommerce-order-details {
    background: rgba(17, 17, 17, 0.95);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
}

.woocommerce-order-received .woocommerce-order-details__title,
.woocommerce-order-received h2.woocommerce-order-details__title {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Order details table */
.woocommerce-order-received .woocommerce-table--order-details,
.woocommerce-order-received table.woocommerce-table--order-details {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.woocommerce-order-received .woocommerce-table--order-details thead th {
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 15px;
    text-align: left;
    border: none;
}

.woocommerce-order-received .woocommerce-table--order-details tbody td {
    color: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.woocommerce-order-received .woocommerce-table--order-details tbody tr:last-child td {
    border-bottom: none;
}

.woocommerce-order-received .woocommerce-table--order-details .product-name {
    font-weight: 500;
}

.woocommerce-order-received .woocommerce-table--order-details .product-name a {
    color: #f97316;
    text-decoration: none;
    transition: color 0.2s ease;
}

.woocommerce-order-received .woocommerce-table--order-details .product-name a:hover {
    color: #fb923c;
}

.woocommerce-order-received .woocommerce-table--order-details .product-quantity {
    color: rgba(255, 255, 255, 0.5);
}

.woocommerce-order-received .woocommerce-table--order-details tfoot th,
.woocommerce-order-received .woocommerce-table--order-details tfoot td {
    padding: 12px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.woocommerce-order-received .woocommerce-table--order-details tfoot th {
    font-weight: 500;
    text-align: left;
}

.woocommerce-order-received .woocommerce-table--order-details tfoot tr:last-child th,
.woocommerce-order-received .woocommerce-table--order-details tfoot tr:last-child td {
    font-weight: 600;
    font-size: 16px;
    color: #fff;
}

/* Customer details / Billing address section */
.woocommerce-order-received .woocommerce-customer-details,
.woocommerce-order-received section.woocommerce-customer-details {
    background: rgba(17, 17, 17, 0.95);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.woocommerce-order-received .woocommerce-customer-details .woocommerce-column__title,
.woocommerce-order-received h2.woocommerce-column__title {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.woocommerce-order-received .woocommerce-customer-details address {
    color: rgba(255, 255, 255, 0.7);
    font-style: normal;
    line-height: 1.7;
}

.woocommerce-order-received .woocommerce-customer-details address p {
    margin: 0 0 5px;
    color: rgba(255, 255, 255, 0.7);
}

/* Order overview at top of page */
.woocommerce-order-received .woocommerce-order-overview,
.woocommerce-order-received ul.woocommerce-order-overview {
    background: rgba(17, 17, 17, 0.95);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 12px;
    padding: 20px 25px;
    margin: 0 0 20px;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px 30px;
}

.woocommerce-order-received .woocommerce-order-overview li {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0;
    padding: 0;
}

.woocommerce-order-received .woocommerce-order-overview li strong {
    color: #fff;
    font-weight: 600;
    display: block;
    margin-top: 4px;
}

/* Two column layout for billing/shipping */
.woocommerce-order-received .woocommerce-columns--2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media screen and (max-width: 768px) {
    .woocommerce-order-received .woocommerce-columns--2 {
        grid-template-columns: 1fr;
    }

    .woocommerce-order-received .woocommerce-order-overview {
        flex-direction: column;
        gap: 12px;
    }
}

/* Responsive */
@media screen and (max-width: 768px) {
    .account-cards-grid {
        grid-template-columns: 1fr;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .gift-card-card .card-header {
        flex-direction: column;
    }

    .linked-status {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================
   Subscription Management
   ============================ */
.subscription-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-top: 12px;
    border-radius: 6px;
    font-size: 13px;
}

.subscription-notice.warning {
    background: #fff8e1;
    color: #e65100;
    border: 1px solid #ffcc02;
}

.subscription-notice i {
    font-size: 16px;
}

/* Modal Styles */
.rust-store-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rust-store-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.rust-store-modal .modal-content {
    position: relative;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.rust-store-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}

.rust-store-modal .modal-header h3 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rust-store-modal .modal-header h3 i {
    color: #cd7f32;
}

.rust-store-modal .modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.rust-store-modal .modal-close:hover {
    color: #fff;
}

.rust-store-modal .modal-body {
    padding: 20px;
    color: rgba(255, 255, 255, 0.85);
}

.rust-store-modal .subscription-info {
    text-align: center;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rust-store-modal .subscription-info .product-name {
    font-size: 16px;
    margin: 0 0 12px;
    color: #fff;
}

.rust-store-modal .subscription-info .subscription-status,
.rust-store-modal .subscription-info .next-payment {
    margin: 6px 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.rust-store-modal .subscription-info .status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.rust-store-modal .subscription-info .status-badge.active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.rust-store-modal .subscription-info .status-badge.pending-cancel {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.rust-store-modal .subscription-info .status-badge.on-hold {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
}

.rust-store-modal .subscription-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rust-store-modal .action-button.full-width {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 12px 16px;
}

.rust-store-modal .action-button.warning {
    background: transparent;
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.rust-store-modal .action-button.warning:hover {
    background: rgba(245, 158, 11, 0.15);
}

.rust-store-modal .action-button.danger {
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
}

.rust-store-modal .action-button.danger:hover {
    background: rgba(239, 68, 68, 0.15);
}

.rust-store-modal .cancel-confirmation {
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.rust-store-modal .warning-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    margin-bottom: 16px;
}

.rust-store-modal .warning-box i {
    color: #f59e0b;
    font-size: 20px;
    flex-shrink: 0;
}

.rust-store-modal .warning-box p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.5;
}

.rust-store-modal .confirmation-actions {
    display: flex;
    gap: 10px;
}

.rust-store-modal .confirmation-actions .action-button {
    flex: 1;
    text-align: center;
    justify-content: center;
}

/* Spinning icon for loading state */
.ri-spin {
    animation: riSpin 1s linear infinite;
}

@keyframes riSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Purchase History Section */
.perks-section.purchase-history {
    margin-top: 30px;
}

.purchase-history-table {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

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

.history-table th {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 16px;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
}

.history-table tr:last-child td {
    border-bottom: none;
}

.history-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.history-table .order-number {
    color: #cd7f32;
    font-weight: 600;
}

.history-table .order-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.history-table .order-products {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-table .order-total {
    font-weight: 600;
    color: #cd7f32;
}

/* Reset theme styles on order-status cell */
.my-perks-page .history-table .order-status,
.my-perks-page .purchase-history-table .order-status,
.woocommerce-MyAccount-content .history-table .order-status {
    background: transparent !important;
    color: inherit !important;
    padding: 14px 16px !important;
    border-radius: 0 !important;
    display: table-cell !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.my-perks-page .history-table .status-badge,
.my-perks-page .purchase-history-table .status-badge,
.history-table .status-badge,
.purchase-history-table .status-badge {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 9px !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.my-perks-page .history-table .status-badge.completed,
.my-perks-page .purchase-history-table .status-badge.completed,
.history-table .status-badge.completed,
.purchase-history-table .status-badge.completed {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
}

.my-perks-page .history-table .status-badge.processing,
.my-perks-page .purchase-history-table .status-badge.processing,
.history-table .status-badge.processing,
.purchase-history-table .status-badge.processing {
    background: rgba(205, 127, 50, 0.15) !important;
    color: #cd7f32 !important;
}

.my-perks-page .history-table .status-badge.on-hold,
.my-perks-page .purchase-history-table .status-badge.on-hold,
.history-table .status-badge.on-hold,
.purchase-history-table .status-badge.on-hold {
    background: rgba(241, 196, 15, 0.15) !important;
    color: #f1c40f !important;
}

.my-perks-page .history-table .status-badge.refunded,
.my-perks-page .purchase-history-table .status-badge.refunded,
.history-table .status-badge.refunded,
.purchase-history-table .status-badge.refunded {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
}

.my-perks-page .history-table .status-badge.pending,
.my-perks-page .purchase-history-table .status-badge.pending,
.history-table .status-badge.pending,
.purchase-history-table .status-badge.pending {
    background: rgba(156, 163, 175, 0.15) !important;
    color: #9ca3af !important;
}

.my-perks-page .history-table .status-badge.cancelled,
.my-perks-page .purchase-history-table .status-badge.cancelled,
.my-perks-page .history-table .status-badge.failed,
.my-perks-page .purchase-history-table .status-badge.failed,
.history-table .status-badge.cancelled,
.purchase-history-table .status-badge.cancelled,
.history-table .status-badge.failed,
.purchase-history-table .status-badge.failed {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
}

.history-table .action-button.small {
    padding: 6px 12px;
    font-size: 11px;
    background: transparent;
    color: #cd7f32;
    border: 1px solid #cd7f32;
    border-radius: 6px;
}

.history-table .action-button.small:hover {
    background: rgba(205, 127, 50, 0.15);
}

/* Responsive table */
@media (max-width: 768px) {
    .purchase-history-table {
        overflow-x: auto;
    }

    .history-table {
        min-width: 600px;
    }

    .history-table th,
    .history-table td {
        padding: 12px 10px;
    }
}

/* ==========================================================================
   Inline Field Validation Error Messages
   ========================================================================== */

.rust-field-error {
    display: block;
    margin-top: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(192, 57, 43, 0.1) 100%);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 6px;
    color: #c0392b;
    font-size: 13px;
    line-height: 1.4;
}

.rust-field-error::before {
    content: "⚠ ";
}

/* Field helper text */
.rust-field-help {
    display: block;
    margin-top: 6px;
    padding: 8px 12px;
    background: rgba(52, 152, 219, 0.08);
    border-radius: 6px;
    color: #666;
    font-size: 12px;
    line-height: 1.5;
}

.rust-field-help strong {
    color: #333;
}

.rust-field-help code {
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 11px;
}

/* Validated field styling */
.form-row.woocommerce-validated .rust-store-field input,
.form-row.woocommerce-validated input#rust_steamid64,
.form-row.woocommerce-validated input#rust_discord_id {
    border-color: #2ecc71 !important;
    background-color: rgba(46, 204, 113, 0.05);
}

.form-row.woocommerce-invalid .rust-store-field input,
.form-row.woocommerce-invalid input#rust_steamid64,
.form-row.woocommerce-invalid input#rust_discord_id {
    border-color: #e74c3c !important;
    background-color: rgba(231, 76, 60, 0.05);
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */

#rust-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.rust-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 450px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s ease;
    opacity: 0;
    pointer-events: auto;
}

.rust-toast-visible {
    transform: translateX(0);
    opacity: 1;
}

.rust-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rust-toast-icon svg {
    width: 20px;
    height: 20px;
}

.rust-toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.rust-toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rust-toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

/* Toast types */
.rust-toast-success {
    border-left: 4px solid #2ecc71;
}

.rust-toast-success .rust-toast-icon {
    color: #2ecc71;
}

.rust-toast-error {
    border-left: 4px solid #e74c3c;
}

.rust-toast-error .rust-toast-icon {
    color: #e74c3c;
}

.rust-toast-warning {
    border-left: 4px solid #f39c12;
}

.rust-toast-warning .rust-toast-icon {
    color: #f39c12;
}

.rust-toast-info {
    border-left: 4px solid #3498db;
}

.rust-toast-info .rust-toast-icon {
    color: #3498db;
}

/* Mobile responsive */
@media (max-width: 480px) {
    #rust-toast-container {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
    }

    .rust-toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}

/* ==========================================================================
   Live Server Status Indicators
   ========================================================================== */

.server-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    padding: 3px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    font-size: 11px;
}

.server-status .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.server-status .status-indicator.loading {
    background: rgba(255, 255, 255, 0.4);
    animation: serverStatusPulse 1.2s ease-in-out infinite;
}

.server-status .status-indicator.online {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.server-status .status-indicator.offline {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.server-status .status-indicator.unknown {
    background: #6b7280;
}

.server-status .status-text {
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

/* Server online state */
.server-name.server-online .server-status .status-text {
    color: #10b981;
}

.server-name.server-offline .server-status .status-text {
    color: #ef4444;
}

@keyframes serverStatusPulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .server-status {
        display: flex;
        margin-left: 0;
        margin-top: 6px;
    }
}

/* ==========================================================================
   Gift Purchase Details Box - Dark Theme Override
   ========================================================================== */

.rust-store-gift-details {
    background: rgba(30, 30, 30, 0.6) !important;
    border: 1px solid rgba(205, 127, 50, 0.3) !important;
}

.rust-store-gift-details h3 {
    color: #cd7f32 !important;
}

.rust-store-gift-details table td {
    color: rgba(255, 255, 255, 0.7) !important;
}

.rust-store-gift-details table td:last-child {
    color: #fff !important;
}

.rust-store-gift-details table a {
    color: #cd7f32 !important;
}

.rust-store-gift-details table a:hover {
    color: #daa520 !important;
}

/* Gift message box */
.rust-store-gift-details > div {
    background: rgba(0, 0, 0, 0.2) !important;
    border-left-color: #cd7f32 !important;
}

.rust-store-gift-details > div p {
    color: rgba(255, 255, 255, 0.7) !important;
}

.rust-store-gift-details > div p:last-child {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Delivered notice */
.rust-store-gift-details p {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* ==========================================================================
   WooCommerce Order Status Badges - Dark Theme
   ========================================================================== */

/* Order status in order header */
.woocommerce-order-details mark.order-status,
.woocommerce-orders mark.order-status,
.woocommerce-MyAccount-content mark.order-status {
    background: transparent !important;
    padding: 4px 12px !important;
    border-radius: 6px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Processing status */
mark.order-status.status-processing {
    background: rgba(205, 127, 50, 0.15) !important;
    color: #cd7f32 !important;
}

/* Completed status */
mark.order-status.status-completed {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
}

/* On-hold status */
mark.order-status.status-on-hold {
    background: rgba(241, 196, 15, 0.15) !important;
    color: #f1c40f !important;
}

/* Pending status */
mark.order-status.status-pending {
    background: rgba(107, 114, 128, 0.15) !important;
    color: #9ca3af !important;
}

/* Cancelled status */
mark.order-status.status-cancelled {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
}

/* Refunded status */
mark.order-status.status-refunded {
    background: rgba(139, 92, 246, 0.15) !important;
    color: #a78bfa !important;
}

/* Failed status */
mark.order-status.status-failed {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
}

/* ==========================================================================
   Discord Stats Shortcodes
   ========================================================================== */

/* Inline template */
.rust-discord-stats--inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: inherit;
}

.rust-discord-stats--inline i.ri-discord-fill {
    color: #5865F2;
}

.rust-discord-stats--inline .stat-separator {
    color: rgba(255, 255, 255, 0.5);
}

/* Badges template */
.rust-discord-stats--badges {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
}

.discord-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    background: rgba(88, 101, 242, 0.1);
    color: #5865F2;
}

.discord-badge i {
    font-size: 12px;
}

.discord-badge--online i {
    color: #22c55e;
}

.discord-badge .badge-count {
    font-weight: 600;
}

.discord-badge .badge-label {
    opacity: 0.8;
}

/* Default template */
.rust-discord-stats--default {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.discord-stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.discord-stat .stat-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(88, 101, 242, 0.1);
    border-radius: 8px;
    color: #5865F2;
}

.discord-stat--online .stat-icon i {
    color: #22c55e;
}

.discord-stat .stat-value {
    font-weight: 700;
    font-size: 18px;
}

.discord-stat .stat-label {
    font-size: 13px;
    opacity: 0.7;
}

/* Discord Widget */
.rust-discord-widget {
    background: linear-gradient(135deg, #2c2f33 0%, #23272a 100%);
    border-radius: 12px;
    padding: 20px;
    max-width: 320px;
    color: #fff;
    font-family: inherit;
}

.discord-widget-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.discord-widget-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #5865F2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.discord-widget-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discord-widget-icon i {
    font-size: 24px;
    color: #fff;
}

.discord-widget-name {
    font-weight: 700;
    font-size: 16px;
}

.discord-widget-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.discord-widget-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.discord-widget-stat .stat-icon {
    color: #b9bbbe;
}

.discord-widget-stat--online .online-indicator {
    color: #22c55e;
}

.discord-widget-stat .stat-value {
    font-weight: 600;
}

.discord-widget-stat .stat-label {
    font-size: 12px;
    color: #b9bbbe;
}

.discord-widget-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: #5865F2;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.discord-widget-button:hover {
    background: #4752c4;
    color: #fff !important;
    text-decoration: none;
}

.discord-widget-button i {
    font-size: 18px;
}
