/* Checkout Specific Styles */
.checkout-container {
    min-height: calc(100vh - 80px);
    padding: 40px 20px;
    background: var(--bg-primary);
    /* Adiciona padding-top para compensar o header fixo */
    padding-top: 100px;
}

.checkout-content {
    max-width: 1400px;
    margin: 0 auto;
}

/* Grid Layout */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

/* Checkout Steps */
.checkout-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
    position: relative;
}

.checkout-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.step {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
    position: relative;
    z-index: 1;
    margin: 0 40px;
    transition: all 0.3s ease;
}

.step.active {
    background: var(--accent);
    transform: scale(1.5);
}

/* Package Selection */
.package-selection {
    margin-bottom: 40px;
}

.package-selection h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: start;
}

.package-card {
    position: relative;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.package-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.package-card.featured {
    border-color: var(--accent);
}

.recommended-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.package-radio {
    position: absolute;
    opacity: 0;
}

.package-label {
    display: block;
    padding: 1.5rem;
    cursor: pointer;
}

.package-radio:checked + .package-label {
    background: rgba(99, 102, 241, 0.1);
}

.package-label h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.package-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.articles-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.package-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.package-features {
    list-style: none;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.package-features li {
    padding: 0.25rem 0;
}

/* Additional Options */
.additional-options h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

.option-group {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.option-group h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Radio Options */
.radio-option {
    display: block;
    margin-bottom: 1rem;
    cursor: pointer;
}

.radio-option input {
    position: absolute;
    opacity: 0;
}

.radio-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.radio-option input:checked + .radio-label {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
}

.option-title {
    font-weight: 500;
}

.option-price {
    color: var(--accent);
    font-weight: 600;
}

/* Sites Grid */
.sites-list {
    margin-top: 1.5rem;
    animation: slideDown 0.3s ease-out;
}

.sites-instruction {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.site-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.site-option:hover {
    border-color: var(--accent);
}

.site-option input:checked + span {
    color: var(--accent);
    font-weight: 500;
}

/* Premium Sites */
.premium-sites-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.premium-sites-section h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.premium-site {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 0.75rem;
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
}

.premium-site:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
}

.site-price {
    font-weight: 600;
    color: var(--accent);
    font-size: 0.875rem;
}

.external-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.external-link:hover {
    color: var(--accent);
}

.premium-warning {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.5rem;
}

.premium-warning svg {
    flex-shrink: 0;
    color: #ef4444;
}

.premium-warning p {
    margin: 0;
    font-size: 0.875rem;
    color: #fca5a5;
    line-height: 1.5;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.char-counter {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Upload Area */
.upload-area {
    margin-top: 1rem;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    background: var(--bg-primary);
    border: 2px dashed var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-label:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
}

.upload-label svg {
    color: var(--accent);
}

.upload-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.uploaded-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.uploaded-image {
    position: relative;
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--bg-primary);
}

.uploaded-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Order Summary */
.order-summary {
    position: sticky;
    top: 100px;
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
}

.summary-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-items {
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.item-name {
    color: var(--text-primary);
}

.item-price {
    font-weight: 600;
    color: var(--text-primary);
}

.summary-divider {
    height: 1px;
    background: var(--border);
    margin: 1rem 0;
}

.additional-items .summary-item {
    font-size: 0.875rem;
}

.additional-items .item-name {
    color: var(--text-secondary);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 1rem 0;
}

.total-price {
    color: var(--accent);
    font-size: 1.5rem;
}

.summary-details {
    margin-bottom: 2rem;
}

.summary-details h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.summary-details ul {
    list-style: none;
    font-size: 0.875rem;
}

.summary-details li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.summary-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.checkout-button {
    width: 100%;
    background: var(--gradient);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--shadow);
}

.security-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.security-badges svg {
    color: var(--accent);
}

/* Custom Article Slider Styles */
#custom-article-config {
    animation: slideDown 0.3s ease-out;
}

.slider-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.slider-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

#slider-value-display {
    color: var(--text-primary);
    font-size: 1.125rem;
}

.slider-price {
    color: var(--accent);
    font-size: 1.25rem;
}

.discount-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    text-align: center;
}

/* Styling the slider */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: var(--border);
    outline: none;
    border-radius: 8px;
    margin: 0.5rem 0;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--accent);
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

input[type=range]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--accent);
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Help Icon and Tooltip/Popup */
.help-icon {
    position: absolute;
    top: 1.75rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.help-icon:hover {
    color: var(--accent);
    background-color: rgba(99, 102, 241, 0.1);
}

/* Tooltip Overlay */
.tooltip-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: none;
}

/* Tooltip Modal */
.tooltip-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    z-index: 1001;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px var(--shadow);
    display: none;
}

.tooltip-content {
    padding: 2.5rem 2rem 2rem 2rem;
    position: relative;
}

.tooltip-content h4 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.tooltip-content p, .tooltip-content li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.tooltip-content ul {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.tooltip-content li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.tooltip-content li:last-child {
    border-bottom: none;
}

.tooltip-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Close Button */
.tooltip-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.3s ease;
}

.tooltip-close:hover {
    color: var(--text-primary);
}

/* Modal Open State */
.modal-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
        order: -1; /* Move summary to top on mobile */
    }
    
    .checkout-steps {
        margin-bottom: 40px;
    }
    
    .step {
        margin: 0 20px;
    }
}

@media (max-width: 768px) {
    .checkout-container {
        padding: 20px 15px;
        padding-top: 80px; /* Menor padding-top no mobile */
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
    }
    
    .checkout-steps {
        margin-bottom: 30px;
    }
    
    .checkout-steps::before {
        display: none;
    }
    
    .step {
        margin: 0 15px;
        width: 10px;
        height: 10px;
    }
    
    .sites-grid {
        grid-template-columns: 1fr;
    }
    
    .option-group {
        padding: 1.5rem;
    }
    
    .help-icon {
        top: 1.5rem;
        right: 1.5rem;
    }
    
    .summary-card {
        padding: 1.5rem;
    }
    
    .upload-label {
        padding: 2rem;
    }
    
    .radio-label {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }
    
    .package-label {
        padding: 1.25rem;
    }
    
    .package-price {
        font-size: 1.25rem;
    }
    
    .package-label h3 {
        font-size: 1.125rem;
    }
    
    .premium-site {
        grid-template-columns: auto 1fr auto;
        font-size: 0.875rem;
    }
    
    .external-link {
        display: none; /* Oculta link externo no mobile para economizar espaço */
    }
    
    .tooltip-modal {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .tooltip-content {
        padding: 2rem 1.5rem 1.5rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .checkout-container {
        padding: 15px 10px;
        padding-top: 70px;
    }
    
    .package-selection h2,
    .additional-options h2 {
        font-size: 1.5rem;
    }
    
    .step {
        margin: 0 10px;
        width: 8px;
        height: 8px;
    }
    
    .option-group {
        padding: 1.25rem;
    }
    
    .help-icon {
        top: 1.25rem;
        right: 1.25rem;
        padding: 3px;
    }
    
    .help-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .summary-card h3 {
        font-size: 1.25rem;
    }
    
    .summary-total {
        font-size: 1.125rem;
    }
    
    .total-price {
        font-size: 1.375rem;
    }
    
    .checkout-button {
        font-size: 1rem;
        padding: 0.875rem;
    }
    
    .site-option {
        padding: 0.625rem;
        font-size: 0.875rem;
    }
    
    .premium-warning {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .premium-warning p {
        font-size: 0.8125rem;
    }
}