.wpgraded-buy-grades-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #ffffff;
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: visible;
}

.wpgraded-buy-grades-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #D32F2F, #F44336, #E53935);
}

.wpgraded-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
    position: relative;
    padding: 20px 0;
}

.wpgraded-progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, #e0e0e0, #f5f5f5);
    border-radius: 3px;
    z-index: 1;
}

.wpgraded-progress-step {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 12px 20px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 0;
    font-weight: 600;
    font-size: 14px;
    color: #666;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 140px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}

.wpgraded-progress-step.active {
    border-color: #D32F2F;
    color: #D32F2F;
    background: linear-gradient(135deg, #ffffff, #ffebee);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.2);
    transform: translateY(-2px);
}

.wpgraded-form-step {
    display: none;
}

.wpgraded-form-step.active {
    display: block;
}

.wpgraded-form-group {
    margin-bottom: 32px;
}

.wpgraded-form-group label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
    line-height: 1.45;
}

.wpgraded-form-group input[type="number"],
.wpgraded-form-group input[type="text"],
.wpgraded-form-group select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 0;
    font-size: 16px;
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.wpgraded-form-group input:focus,
.wpgraded-form-group select:focus {
    outline: none;
    border-color: #D32F2F;
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.1);
    transform: translateY(-1px);
}

.wpgraded-radio-label {
    display: block;
    margin-bottom: 16px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 0;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.3s ease;
    position: relative;
}

.wpgraded-tooltip-host-active {
    position: relative;
    z-index: 1000000 !important;
}

.wpgraded-radio-label input[type="radio"] {
    margin-right: 15px;
    transform: scale(1.2);
    accent-color: #D32F2F;
}

.wpgraded-radio-label:hover {
    background: linear-gradient(135deg, #ffebee, #ffffff);
    border-color: #D32F2F;
    box-shadow: 0 4px 16px rgba(211, 47, 47, 0.1);
    transform: translateY(-1px);
}

.wpgraded-radio-label:has(input:checked) {
    border-color: #D32F2F;
    background: linear-gradient(135deg, #ffebee, #ffffff);
    box-shadow: 0 4px 16px rgba(211, 47, 47, 0.15);
}

.wpgraded-next-button,
.wpgraded-prev-button {
    padding: 16px 32px;
    border: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.wpgraded-next-button {
    background: #ac1f1f;
    color: white;
    box-shadow: 0 4px 16px rgba(172, 31, 31, 0.28);
}

.wpgraded-next-button:hover {
    background: #951b1b;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(172, 31, 31, 0.38);
}

.wpgraded-prev-button {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e0e0e0;
}

.wpgraded-prev-button:hover {
    background: #e9ecef;
    border-color: #ccc;
    transform: translateY(-1px);
}

.wpgraded-card-section {
    border: 2px solid #e0e0e0;
    border-radius: 0;
    margin-bottom: 24px;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.wpgraded-card-section:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.wpgraded-card-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.wpgraded-card-header:hover {
    background: linear-gradient(135deg, #ffebee, #ffffff);
    color: #D32F2F;
}

.wpgraded-card-header::after {
    content: '▼';
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #D32F2F;
    font-weight: bold;
}

.wpgraded-card-header.collapsed::after {
    transform: rotate(-90deg);
}

.wpgraded-card-details {
    padding: 15px;
    display: block;
}

.wpgraded-card-details.collapsed {
    display: none;
}

.wpgraded-card-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.wpgraded-card-details-grid.full-width {
    grid-template-columns: 1fr;
}

.wpgraded-card-details-grid.four-fields {
    grid-template-columns: 1fr 1fr;
}

.wpgraded-card-details-grid.four-fields.full-width {
    grid-template-columns: 1fr;
}

.wpgraded-form-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.wpgraded-form-navigation .wpgraded-next-button,
.wpgraded-form-navigation .wpgraded-prev-button {
    margin-right: 0;
}

.wpgraded-shipping-option {
    margin-top: 24px;
    padding: 32px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    background: linear-gradient(135deg, #fafafa, #ffffff);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.wpgraded-order-summary {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.wpgraded-order-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.wpgraded-order-summary-item:last-child {
    border-bottom: none;
}

.wpgraded-order-total {
    font-weight: bold;
    font-size: 1.2em;
    border-top: 2px solid #333;
    margin-top: 10px;
    padding-top: 10px;
}

.wpgraded-card-details-list {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin: 10px 0;
}

.wpgraded-section-title {
    font-weight: bold;
    margin: 15px 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

.wpgraded-hint-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D32F2F, #F44336);
    color: white;
    text-align: center;
    line-height: 1;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
    transition: all 0.3s ease;
    z-index: 10;
    flex: 0 0 auto;
    touch-action: manipulation;
}

.wpgraded-hint-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: inherit;
    font: inherit;
    line-height: 1;
}

.wpgraded-hint-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(211, 47, 47, 0.4);
}

.wpgraded-hint-button.is-open {
    background: transparent;
    box-shadow: none;
    z-index: 1000001;
}

.wpgraded-hint-button.is-open .wpgraded-hint-icon {
    opacity: 0;
    visibility: hidden;
}

.wpgraded-hint-tooltip {
    display: none;
    position: absolute;
    background: linear-gradient(135deg, #D32F2F, #F44336);
    color: white;
    padding: 18px 18px 16px;
    border-radius: 12px;
    width: 280px;
    max-width: min(280px, calc(100vw - 32px));
    font-size: 13px;
    line-height: 1.5;
    z-index: 1000002;
    left: 50%;
    top: calc(100% + 12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateX(-50%);
    font-weight: 500;
    text-align: left;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    pointer-events: auto;
}

.wpgraded-hint-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #D32F2F;
    transform: translateX(-50%) rotate(45deg);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999999;
}

.wpgraded-hint-tooltip-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.wpgraded-hint-tooltip-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.wpgraded-hint-button:hover .wpgraded-hint-tooltip,
.wpgraded-hint-button.is-open .wpgraded-hint-tooltip {
    display: block;
    animation: tooltipFadeInDesktop 0.3s ease;
}

@keyframes tooltipFadeInDesktop {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Form titles styling */
.wpgraded-form-step h2 {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
    position: relative;
}

.wpgraded-form-step h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #D32F2F, #F44336);
    border-radius: 3px;
}

.wpgraded-form-step h3 {
    color: #D32F2F;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Loading states */
.wpgraded-next-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@media (max-width: 768px) {
    .wpgraded-buy-grades-container {
        margin: 16px auto;
        padding: 20px 16px 24px;
        border-radius: 12px;
        max-width: calc(100vw - 24px);
    }
    
    .wpgraded-card-details-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .wpgraded-progress-bar {
        display: block;
        margin-bottom: 24px;
        padding: 0;
    }

    .wpgraded-progress-bar::before {
        display: none;
    }
    
    .wpgraded-progress-step {
        display: none;
        min-width: 0;
        width: 100%;
        min-height: 64px;
        padding: 14px 16px;
        font-size: 14px;
        border-radius: 0;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .wpgraded-progress-step.active {
        display: flex;
    }
    
    .wpgraded-radio-label,
    .wpgraded-shipping-option,
    .wpgraded-order-summary,
    .wpgraded-card-header,
    .wpgraded-card-details,
    .wpgraded-pulled-from-pack-inline {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .wpgraded-hint-tooltip {
        position: fixed;
        left: 16px;
        right: 16px;
        top: auto;
        bottom: 16px;
        width: auto;
        max-width: none;
        border-radius: 18px;
        padding: 20px 20px 18px;
        font-size: 14px;
        line-height: 1.6;
        transform: none;
        box-shadow: 0 18px 40px rgba(211, 47, 47, 0.35);
    }

    .wpgraded-hint-button:hover,
    .wpgraded-hint-button.is-open {
        transform: none;
    }

    .wpgraded-hint-button.is-open {
        width: 24px;
        height: 24px;
    }

    .wpgraded-hint-button:hover .wpgraded-hint-tooltip {
        display: none;
        animation: none;
    }

    .wpgraded-hint-button.is-open .wpgraded-hint-tooltip {
        display: block;
        animation: tooltipFadeInMobile 0.3s ease;
    }

    @keyframes tooltipFadeInMobile {
        from {
            opacity: 0;
            transform: translateY(12px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .wpgraded-hint-tooltip::before {
        display: none;
    }

    .wpgraded-hint-tooltip-close {
        top: 10px;
        right: 10px;
        width: 26px;
        height: 26px;
        font-size: 18px;
    }

    .wpgraded-form-group {
        margin-bottom: 24px;
    }
    
    .wpgraded-form-step h2 {
        font-size: 20px;
        line-height: 1.3;
        margin-bottom: 24px;
    }

    .wpgraded-form-step h3 {
        font-size: 18px;
    }

    .wpgraded-form-navigation {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .wpgraded-form-navigation .wpgraded-next-button,
    .wpgraded-form-navigation .wpgraded-prev-button {
        width: 100%;
    }

    .wpgraded-form-navigation .wpgraded-next-button {
        order: -1;
    }

    .wpgraded-order-summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .wpgraded-order-total {
        font-size: 1.1em;
    }

    .wpgraded-card-header {
        font-size: 15px;
    }

    .wpgraded-hint-button {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .wpgraded-buy-grades-container {
        margin: 12px auto;
        padding: 18px 14px 22px;
        max-width: calc(100vw - 16px);
    }

    .wpgraded-progress-step {
        min-height: 56px;
        font-size: 12px;
    }

    .wpgraded-form-group label {
        font-size: 15px;
    }

    .wpgraded-form-group input[type="number"],
    .wpgraded-form-group input[type="text"],
    .wpgraded-form-group select {
        padding: 14px 16px;
    }
}

/* Inline pulled from pack checkboxes */
.wpgraded-pulled-from-pack-inline {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #D32F2F;
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(211, 47, 47, 0.1);
}

.wpgraded-pulled-from-pack-inline label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #D32F2F;
    margin: 0;
    font-size: 14px;
}

.wpgraded-pulled-from-pack-inline input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.3);
    accent-color: #D32F2F;
}

.wpgraded-pulled-from-pack-inline:hover {
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.2);
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

/* Login Modal Styles */
.wpgraded-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wpgraded-modal.wpgraded-modal-visible {
    display: flex;
    opacity: 1;
}

.wpgraded-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.wpgraded-modal-content {
    position: relative;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin: 20px;
}

.wpgraded-modal-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 24px;
    color: #333;
}

.wpgraded-modal-content p {
    margin-bottom: 25px;
    color: #666;
    line-height: 1.5;
}

.wpgraded-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.wpgraded-modal-buttons .button,
.wpgraded-modal-buttons .button-secondary {
    min-width: 120px;
    padding: 12px 24px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.wpgraded-modal-buttons .button:hover,
.wpgraded-modal-buttons .button-secondary:hover {
    background-color: #701414;
    border-color: #701414;
    color: #fff;
}

.wpgraded-modal-buttons .button:active,
.wpgraded-modal-buttons .button-secondary:active {
    background-color: #5a1010;
    border-color: #5a1010;
    color: #fff;
    transform: translateY(1px);
}

@media (max-width: 480px) {
    .wpgraded-modal-content {
        padding: 25px;
    }
    
    .wpgraded-modal-content h2 {
        font-size: 20px;
    }
    
    .wpgraded-modal-buttons {
        flex-direction: column;
    }
    
    .wpgraded-modal-buttons .button,
    .wpgraded-modal-buttons .button-secondary {
        width: 100%;
    }
}
