/**
 * VLAB Payment Widget Styles
 * Windows Vista Aero Theme
 */

/* ========== Button Styles ========== */
.vls-payment-button {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(180deg, #7FBE41 0%, #5FA12F 50%, #4E8A25 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid #4A7D22;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.vls-payment-button:hover {
    background: linear-gradient(180deg, #8ACE4E 0%, #6BAF3C 50%, #5A992F 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.vls-payment-button:active {
    transform: translateY(-1px);
}

/* ========== Overlay & Modal ========== */
.vlab-payment-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.vlab-payment-modal {
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: vlab-modal-appear 0.3s ease-out;
}

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

/* ========== Header ========== */
.vlab-payment-modal__header {
    padding: 20px 25px;
    border-bottom: 1px solid #d0d0d0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, #B7D8F4 0%, #5B9BD5 50%, #4580C4 100%);
    color: #003366;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vlab-payment-modal__title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.vlab-payment-modal__close {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #003366;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.vlab-payment-modal__close:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

/* ========== Body ========== */
.vlab-payment-modal__body {
    background: #ffffff;
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

/* ========== Loader ========== */
.vlab-payment-loader {
    text-align: center;
    padding: 40px 20px;
}

.vlab-payment-loader__spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #D4E8F7;
    border-top-color: #4580C4;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: vlab-spin 0.8s linear infinite;
}

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

.vlab-payment-loader p {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
}

/* ========== Error ========== */
.vlab-payment-error {
    background-color: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #c33;
}

.vlab-payment-error p {
    margin: 0;
    line-height: 1.5;
}

/* ========== User Info ========== */
.vlab-payment-user {
    display: flex;
    align-items: center;
    padding: 15px;
    background: linear-gradient(180deg, #E8F3FC 0%, #D4E8F7 100%);
    border: 1px solid #A8C8E4;
    border-radius: 8px;
    margin-bottom: 25px;
}

.vlab-payment-user__avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vlab-payment-user__info {
    display: flex;
    flex-direction: column;
}

.vlab-payment-user__name {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.vlab-payment-user__balance {
    font-size: 14px;
    color: #6b7280;
}

/* ========== Products ========== */
.vlab-payment-products {
    margin-bottom: 25px;
}

.vlab-payment-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vlab-payment-product:hover {
    border-color: #5B9BD5;
    background-color: #F7FBFE;
    transform: translateX(4px);
}

.vlab-payment-product--active {
    border-color: #4580C4;
    background: linear-gradient(180deg, #E8F3FC 0%, #D4E8F7 100%);
    box-shadow: 0 2px 8px rgba(69, 128, 196, 0.3);
}

.vlab-payment-product__info {
    flex: 1;
}

.vlab-payment-product__name {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.vlab-payment-product__description {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.vlab-payment-product__price {
    text-align: right;
    font-size: 24px;
    font-weight: 700;
    color: #4580C4;
}

.vlab-payment-product__amount {
    margin-right: 3px;
}

.vlab-payment-product__currency {
    font-size: 20px;
}

/* ========== Form ========== */
.vlab-payment-form {
    margin-top: 20px;
}

.vlab-payment-form__group {
    margin-bottom: 20px;
}

.vlab-payment-form__label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.vlab-payment-form__required {
    color: #ef4444;
}

.vlab-payment-form__input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.vlab-payment-form__input:focus {
    outline: none;
    border-color: #5B9BD5;
    box-shadow: 0 0 0 3px rgba(91, 155, 213, 0.2);
}

.vlab-payment-form__input:hover {
    border-color: #cbd5e1;
}

/* ========== Total ========== */
.vlab-payment-form__total {
    padding: 12px 0;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 2px solid #e5e7eb;
}

.vlab-payment-form__total-label {
    color: #9ca3af;
    font-size: 14px;
    font-weight: 400;
}

.vlab-payment-form__total-amount {
    color: #1f2937;
    font-size: 28px;
    font-weight: 700;
}

.vlab-payment-form__total-amount .currency {
    font-size: 20px;
    color: #6b7280;
    font-weight: 600;
    margin-left: 4px;
}

/* ========== Validation Errors ========== */
.vlab-payment-form__errors {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.vlab-payment-form__errors ul {
    margin: 0;
    padding-left: 20px;
    color: #dc2626;
}

.vlab-payment-form__errors li {
    margin-bottom: 5px;
    font-size: 14px;
}

.vlab-payment-form__errors li:last-child {
    margin-bottom: 0;
}

/* ========== Buttons ========== */
.vlab-payment-form__submit {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(180deg, #7FBE41 0%, #5FA12F 50%, #4E8A25 100%);
    color: #ffffff;
    border: 1px solid #4A7D22;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.vlab-payment-form__submit:hover {
    background: linear-gradient(180deg, #8ACE4E 0%, #6BAF3C 50%, #5A992F 100%);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.vlab-payment-form__submit:active {
    transform: translateY(0);
}

.vlab-payment-form__cancel {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(180deg, #F2F2F2 0%, #E0E0E0 100%);
    color: #333333;
    border: 1px solid #ABABAB;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vlab-payment-form__cancel:hover {
    background: linear-gradient(180deg, #FAFAFA 0%, #E8E8E8 100%);
    border-color: #999999;
}

/* ========== Success ========== */
.vlab-payment-success {
    text-align: center;
    padding: 30px 20px;
}

.vlab-payment-success__icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(180deg, #7FBE41 0%, #5FA12F 100%);
    color: #ffffff;
    font-size: 50px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    animation: vlab-success-appear 0.5s ease-out;
}

@keyframes vlab-success-appear {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-180deg);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.vlab-payment-success h3 {
    color: #1f2937;
    font-size: 24px;
    margin: 0 0 15px 0;
}

.vlab-payment-success p {
    color: #6b7280;
    font-size: 16px;
    margin: 10px 0;
}

/* ========== Responsive ========== */
@media (max-width: 640px) {
    .vlab-payment-modal {
        width: 95%;
        max-height: 95vh;
    }

    .vlab-payment-modal__header {
        padding: 15px 20px;
    }

    .vlab-payment-modal__title {
        font-size: 18px;
    }

    .vlab-payment-modal__body {
        padding: 20px;
    }

    .vlab-payment-product {
        flex-direction: column;
        align-items: flex-start;
    }

    .vlab-payment-product__price {
        margin-top: 10px;
        align-self: flex-end;
    }
}

/* ========== Accessibility ========== */
.vlab-payment-modal:focus {
    outline: none;
}

.vlab-payment-form__input:invalid {
    border-color: #fca5a5;
}

/* ========== Print Styles ========== */
@media print {
    .vlab-payment-overlay {
        display: none;
    }
}

