/* Service Selection Boxes Styling */
.sbox-11-service {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.sbox-11-service::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(137, 34, 254, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.sbox-11-service:hover {
    border-color: var(--theme-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(137, 34, 254, 0.2);
}

.sbox-11-service:hover::before {
    opacity: 1;
}

/* Individual service hover effects */
#box-jewelry .sbox-11-service:hover,
#box-engine .sbox-11-service:hover,
#box-pcb .sbox-11-service:hover {
    border-color: #8922fe;
    box-shadow: 0 8px 15px rgba(137, 34, 254, 0.3);
    background-color: rgba(137, 34, 254, 0.03);
}

/* Specific service item styling */
.sbox-11-service[data-service-id="1"]:hover,
.sbox-11-service[data-service-id="2"]:hover,
.sbox-11-service[data-service-id="3"]:hover {
    border-color: #8922fe;
    box-shadow: 0 8px 15px rgba(137, 34, 254, 0.2);
}

.selected-service {
    border: 3px solid var(--theme-color) !important;
    box-shadow: 0 10px 20px rgba(137, 34, 254, 0.3) !important;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    background-color: rgba(137, 34, 254, 0.05);
}

.selected-service::after {
    background-color: rgba(137, 34, 254, 0.08);
    opacity: 1;
}

/* Ensure the content appears above the overlay */
.sbox-11-service > * {
    position: relative;
    z-index: 2;
}

/* Service Selection Animation */
@keyframes selectedPulse {
    0% { box-shadow: 0 0 0 0 rgba(137, 34, 254, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(137, 34, 254, 0); }
    100% { box-shadow: 0 0 0 0 rgba(137, 34, 254, 0); }
}

.selected-animate {
    animation: selectedPulse 0.8s ease-out;
}

/* Selection highlight effect */
.selection-highlight {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background-color: rgba(137, 34, 254, 0.2);
    opacity: 1;
    z-index: 1;
    pointer-events: none;
    animation: selectionFade 0.7s ease-out forwards;
}

@keyframes selectionFade {
    0% { opacity: 0.7; }
    100% { opacity: 0; }
}

/* Emphasized box selection */
#box-jewelry .selected-service,
#box-engine .selected-service,
#box-pcb .selected-service {
    position: relative;
}

#box-jewelry .selected-service::after,
#box-engine .selected-service::after,
#box-pcb .selected-service::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    border: 2px dashed rgba(137, 34, 254, 0.3);
    animation: selectedBorder 2s linear infinite;
    pointer-events: none;
}

@keyframes selectedBorder {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sbox-11-ico {
    margin-bottom: 20px;
}

.sbox-11-service h5 {
    margin-bottom: 15px;
}

.sbox-11-service p {
    margin-bottom: 15px;
    flex-grow: 1;
}

/* Terms and Conditions Styling */
.form-check {
    margin-top: 15px;
    display: flex;
    align-items: flex-start;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 3px;
    border: 2px solid #888;
    cursor: pointer;
    margin-right: 10px;
}

.form-check-input:checked {
    background-color: #8922fe;
    border-color: #8922fe;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
    background-size: 70%;
}

.form-check-label {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0;
}

.form-check-label a {
    color: #8922fe;
    text-decoration: underline;
}

.form-check-label a:hover {
    text-decoration: none;
}

/* Disabled button styling */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modal Styling */
.modal-body {
    padding: 30px 35px;
}

.modal-content {
    border-radius: 15px;
}

.modal-header {
    padding: 20px 35px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-footer {
    padding: 20px 35px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-body h5 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: var(--theme-color);
    font-weight: 600;
}

.modal-body h5:first-child {
    margin-top: 0;
}

.modal-body p, .modal-body ul {
    margin-bottom: 20px;
    line-height: 1.6;
}

.modal-body ul {
    padding-left: 20px;
}

.modal-body ul li {
    margin-bottom: 8px;
}

.modal-dialog-scrollable .modal-content {
    max-height: 85vh;
}

/* Terms and Privacy Panels */
.terms-scroll-box {
    height: 300px;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--theme-color) #f0f0f0;
    text-align: left;
    font-size: 0.875rem;
    line-height: 1.5;
}

.terms-scroll-box::-webkit-scrollbar {
    width: 8px;
}

.terms-scroll-box::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.terms-scroll-box::-webkit-scrollbar-thumb {
    background-color: var(--theme-color);
    border-radius: 10px;
    border: 2px solid #f0f0f0;
}

.card-header.bg--theme-light {
    background-color: #8922fe;
}

.terms-scroll-box h5 {
    color: var(--theme-color);
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1rem;
}

.terms-scroll-box p {
    margin-bottom: 1rem;
    text-align: left;
    font-size: 0.875rem;
}

.terms-scroll-box ul {
    padding-left: 20px;
    font-size: 0.875rem;
}

.terms-scroll-box ul li {
    margin-bottom: 5px;
    text-align: left;
}

.terms-link, .privacy-link {
    color: var(--theme-color);
    text-decoration: underline;
}

.terms-link:hover, .privacy-link:hover {
    text-decoration: none;
}

/* Address and Payment Styling */
.selected-service-summary {
    background-color: rgba(137, 34, 254, 0.05);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(137, 34, 254, 0.1);
    animation: fadeIn 0.3s ease;
}

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

.selected-service-summary h6 {
    color: var(--theme-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.stripe-placeholder {
    border-radius: 8px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    min-height: 120px;
}

.text-theme {
    color: var(--theme-color) !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.link-theme {
    color: var(--theme-color);
    text-decoration: underline;
}

.link-theme:hover {
    text-decoration: none;
}

/* Payment cards layout */
.card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 20px;
}

/* Responsive adjustments for payment section */
@media (max-width: 767.98px) {
    .card {
        margin-bottom: 20px;
    }
}

/* Account Tabs Styling */
.nav-tabs {
    border-bottom: 1px solid rgba(137, 34, 254, 0.2);
}

.nav-tabs .nav-link {
    color: #666;
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    padding: 10px 15px;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: var(--theme-color);
}

.nav-tabs .nav-link.active {
    color: var(--theme-color);
    background-color: transparent;
    border-bottom: 2px solid var(--theme-color);
}

/* Styles for form elements in tabs */
.tab-content {
    padding-top: 15px;
}

.tab-content .form-label {
    font-weight: 500;
    font-size: 0.9rem;
}

.tab-content .link-theme {
    font-size: 0.9rem;
}

/* Payment Price Update Styling */
.price-update {
    transition: all 0.3s ease;
}

.price-update.highlight {
    animation: priceUpdate 0.6s ease;
}

@keyframes priceUpdate {
    0% {
        transform: scale(1);
        color: var(--theme-color);
    }
    50% {
        transform: scale(1.1);
        color: #8922fe;
    }
    100% {
        transform: scale(1);
        color: inherit;
    }
}

.payment-section {
    transition: all 0.3s ease;
}

.payment-section.updating {
    opacity: 0.7;
}

.price-container {
    position: relative;
    display: inline-block;
}

.price-change {
    position: absolute;
    top: -20px;
    right: -10px;
    font-size: 0.8rem;
    color: #28a745;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.price-change.show {
    opacity: 1;
    transform: translateY(0);
}

.price-change.increase {
    color: #dc3545;
}

.price-change.decrease {
    color: #28a745;
}

/* Dynamic Payment Section */
.payment-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.payment-section.has-service {
    background-color: rgba(137, 34, 254, 0.03);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(137, 34, 254, 0.08);
}

.price-breakdown {
    border-top: 1px solid rgba(137, 34, 254, 0.1);
    margin-top: 15px;
    padding-top: 15px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.price-total {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--theme-color);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid rgba(137, 34, 254, 0.1);
}

.payment-options {
    display: none;
}

.has-service .payment-options {
    display: none !important;
}

.buy-now-button {
    display: none;
    width: 100%;
    padding: 12px;
    background: var(--theme-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.has-service .buy-now-button {
    display: block;
    animation: fadeInUp 0.4s ease;
}

.buy-now-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(137, 34, 254, 0.2);
}

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

.price-value {
    transition: all 0.3s ease;
}

.price-value.updating {
    animation: priceUpdate 0.5s ease;
}

@keyframes priceUpdate {
    0% { opacity: 0.5; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

.price-value, .total-value {
    transition: all 0.3s ease;
}

.price-value.updating, .total-value.updating {
    color: var(--theme-color);
    transform: scale(1.05);
}

/* Payment Section Updates */
.payment-outer .payment-methods {
    display: none;  /* Hide the original payment methods */
}

.pay-now-btn {
    display: block;
    width: 100%;
    padding: 20px;
    background: linear-gradient(45deg, #8922fe, #9644fe);
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 12px;
    margin: 20px 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(137, 34, 254, 0.2);
}

.pay-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(137, 34, 254, 0.3);
    background: linear-gradient(45deg, #9644fe, #8922fe);
}

.pay-now-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(137, 34, 254, 0.2);
}

.payment-outer {
    background: rgba(137, 34, 254, 0.03);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Payment Button States */
.pay-now-btn[disabled],
.pay-now-btn.disabled {
    background: linear-gradient(45deg, #c4a4fe, #d4b4fe);
    cursor: not-allowed;
    transform: none !important;
    opacity: 0.7;
    box-shadow: none !important;
    position: relative;
}

.pay-now-btn[disabled]::after,
.pay-now-btn.disabled::after {
    content: "Please accept terms first";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #dc3545;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pay-now-btn[disabled]:hover::after,
.pay-now-btn.disabled:hover::after {
    opacity: 1;
}

/* Terms checkbox animation */
.form-check-input:checked + label + .pay-now-btn {
    animation: enableButton 0.4s ease forwards;
}

@keyframes enableButton {
    0% { transform: scale(0.98); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Payment Button States */
#paypal-button[disabled],
#paypal-button.disabled {
   /* opacity: 0.6;  */
    cursor: not-allowed;
    position: relative;
}

#paypal-button[disabled]::after,
#paypal-button.disabled::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #dc3545;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#paypal-button[disabled]:hover::after,
#paypal-button.disabled:hover::after {
    opacity: 1;
}

/* Payment Button Anchor Styling */
#paypal-button[href] {
    text-decoration: none;
    display: inline-block;
    pointer-events: none;
}

#paypal-button[href]:not(.disabled) {
    pointer-events: auto;
}
