.error-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #1e1e1e;
    color: #eee;
    border-radius: 12px;
}

.checkout-step {
    display: none;
}

.checkout-step.active {
    display: block;
}

button {
    margin: 0.5rem 0.25rem;
}

input[type="text"], input[type="email"] {
    width: 100%;
    padding: 0.4rem;
    border-radius: 4px;
    border: 1px solid #444;
    background: #222;
    color: #eee;
}

.summary-field {
    margin-bottom: 0.5rem;
}

.btn-next {
  display: inline-block;
  background-color: #0b93f2;
  color: #ffffff;
  padding: 0.7rem 1.4rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  margin: auto;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn-next:hover {
  background-color: #0877d1;
}

.btn-back {
  display: inline-block;
  background-color: #0b93f2;
  color: #ffffff;
  padding: 0.7rem 1.4rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

h3 {
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: 2.2rem;
  text-align: center;
  color: #ffffff;
}

/* Campos de texto */
.txt_field {
  position: relative;
  margin-bottom: 1.2rem;
}

.txt_field input {
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 1rem;
  color: #fff;
  outline: none;
  transition: border-color 0.3s;
}

.txt_field select {
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 1rem;
  color: #fff;
  outline: none;
  transition: border-color 0.3s;
}

.txt_field label {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: #aaa;
  font-size: 0.95rem;
  pointer-events: none;
  transition: 0.3s ease;
}

label {
  color: #0b93f2;
  font-size: 0.95rem;
  pointer-events: none;
}

.txt_field input:focus {
  border-color: #0B93F2;
}

.txt_field input:focus ~ label,
.txt_field input:not(:placeholder-shown):not(:focus) ~ label {
  top: -10px;
  font-size: 0.8rem;
  color: #0b93f2;
  background-color: #1e1e1e;
  padding: 0 4px;
}

.txt_field {
  position: relative;
  margin-bottom: 1.5rem;
}

.txt_field input {
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 0.75rem;
  background: transparent;
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 1rem;
  color: #fff;
  outline: none;
  transition: border-color 0.3s;
}

.txt_field label {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: #aaa;
  font-size: 1rem;
  pointer-events: none;
  transition: all 0.3s ease;
  background-color: #1e1e1e;
  padding: 0 4px;
}

/* Label sobe ao focar ou digitar */
.txt_field input:focus + label,
.txt_field input:not(:placeholder-shown):not(:focus) + label {
  top: -10px;
  left: 10px;
  font-size: 0.8rem;
  color: #0b93f2;
}

/* Corrige z-index se necessário */
.txt_field input:focus {
  border-color: #0B93F2;
  z-index: 1;
}

.checkout-step {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.address-row label {
    top: 51%;
}

/* ---------------- SELECT --------------------- */

.custom-select-container {
    position: relative;
    width: 100%;
}

/* Hide the native select */
#addressSelectContainer, #paymentSelectContainer, #paymentTypeSelectContainer {
    display: none !important;
}

#addressSelect {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

#paymentSelectContainer {
    display: none !important;
}

#paymentMethod {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -999 !important;
    width: 0 !important;
    height: 0 !important;
}

/* Custom select display */
.select-display {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d30 100%);
    margin-top: 12px;
    margin-bottom: 36px;
    border: 1px solid #404040;
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.select-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.select-display:hover {
    border-color: #606060;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.select-display:hover::before {
    opacity: 1;
}

.select-display:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.select-content {
    flex: 1;
}

.select-placeholder {
    color: #888;
    font-size: 16px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.select-display:hover .select-placeholder {
    color: #aaa;
}

.select-selected {
    color: #ffffff;
    font-weight: 500;
}

.select-address-info {
    color: #999;
    font-size: 14px;
    margin-top: 4px;
    line-height: 1.3;
}

.select-icon {
    width: 20px;
    height: 20px;
    color: #666;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-left: 12px;
}

.select-display:hover .select-icon {
    color: #888;
}

/* Dropdown options (if implementing custom dropdown) */
.select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #404040;
    border-radius: 12px;
    margin-top: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.select-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.select-option {
    padding: 16px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #2d2d30;
    color: #fff;
}

.select-option:last-child {
    border-bottom: none;
}

.select-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.select-option.add-new {
    color: #4a9eff;
    font-weight: 500;
}

.select-option.add-new:hover {
    background: rgba(74, 158, 255, 0.1);
}

/* Payment method icons */
.payment-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    flex-shrink: 0;
}

.payment-icon.credit-card {
    background: linear-gradient(135deg, #4a90e2, #5ba3f5);
}

.payment-icon.debit-card {
    background: linear-gradient(135deg, #f5a623, #f7b731);
}

.payment-icon.paypal {
    background: linear-gradient(135deg, #0070ba, #003087);
}

.payment-icon.pix {
    background: linear-gradient(135deg, #32bcad, #00a991);
}

.payment-icon.add-new {
    background: linear-gradient(135deg, #4a9eff, #6b5fff);
}

.payment-details {
    flex: 1;
}

.payment-method-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.payment-card-info {
    font-size: 13px;
    color: #999;
}

/* Focus states for accessibility */
.select-display:focus-within {
    outline: 2px solid #4a9eff;
    outline-offset: 2px;
    border-color: #4a9eff;
}

/* Responsive design */
@media (max-width: 480px) {
    .select-display {
        padding: 14px 16px;
        min-height: 52px;
    }

    .select-placeholder {
        font-size: 15px;
    }
}

/* Animation for icon rotation when open */
.custom-select-container.open .select-icon {
    transform: rotate(180deg);
    color: #4a9eff;
}

/* Enhanced visual feedback */
.select-display {
    background-image:
        linear-gradient(135deg, #1a1a1a 0%, #2d2d30 100%),
        radial-gradient(circle at top left, rgba(74, 158, 255, 0.1), transparent 50%);
}

/* Subtle glow effect on hover */
.select-display::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #4a9eff, #6b5fff, #4a9eff);
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.select-display:hover::after {
    opacity: 0.3;
}

body * {
	caret-color: transparent;
}

.row {
    width: 80%;
    margin: auto;
    display: flex;
    align-items: flex-start;
}

section, aside {
    background-color: #ffffff;
    margin: 1rem;
    padding: 1rem;
}

.addresses-section {
    margin-bottom: 30px;
}

.addresses-section h4 {
    margin-bottom: 20px;
    color: #333;
    font-weight: bold;
}

.addresses-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.address-option {
    position: relative;
}

.address-radio {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.address-label {
    display: block;
    cursor: pointer;
    transition: all 0.3s ease;
}

.address-card {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    background: #fff;
    transition: all 0.3s ease;
    position: relative;
}

.address-radio:checked + .address-label .address-card {
    border-color: #007bff;
    background: #e7f3ff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.address-radio:checked + .address-label .address-card::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 15px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.address-header h5 {
    margin: 0 0 10px 0;
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

.address-details p {
    margin: 3px 0;
    color: #666;
    font-size: 14px;
}

.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
}

.divider span {
    background: #fff;
    padding: 0 20px;
    color: #6c757d;
    font-weight: bold;
}

.new-address-option {
    margin-bottom: 20px;
}

.new-address-label {
    display: block;
    cursor: pointer;
}

.new-address-card {
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.address-radio:checked + .new-address-label .new-address-card {
    border-color: #28a745;
    border-style: solid;
    background: #e8f5e8;
}

.new-address-icon {
    font-size: 24px;
    color: #6c757d;
    margin-bottom: 10px;
}

.address-radio:checked + .new-address-label .new-address-icon {
    color: #28a745;
}

.new-address-card h5 {
    margin: 0 0 5px 0;
    color: #333;
    font-weight: bold;
}

.new-address-card p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.new-address-fields {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    background: #f8f9fa;
    margin-top: 20px;
}

.form-section h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-weight: bold;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .addresses-list {
        grid-template-columns: 1fr;
    }

    .address-row {
        flex-direction: column !important;
    }

    .address-row .txt_field {
        max-width: none !important;
    }
}

/* Hover effects */
.address-label:hover .address-card,
.new-address-label:hover .new-address-card {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Reforça cursor visível em campos editáveis */
input,
textarea,
[contenteditable="true"],
select,
button {
	caret-color: auto !important;
}

textarea {
    margin-bottom: 16px;
}

.select-category {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.8rem;
}

.select-category .label-above {
    font-weight: 500;
    color: #333;
}

.select-category select {
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}


.payout-notice {
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    padding: 16px 18px;
    margin: 24px 0;
    background: rgba(255, 255, 255, 0.04);
}

.payout-notice h4 {
    font-size: 1rem;
    margin: 0 0 10px;
    color: #ffffff;
}

.payout-notice p {
    margin: 0 0 10px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
}

.payout-notice p:last-child {
    margin-bottom: 0;
}
