/* =========================================================
   CLOUDRIGHT OVERLAY
   ========================================================= */

.cloudright-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 999999;
    backdrop-filter: blur(4px);
}


/* =========================================================
   MAIN MODAL
   ========================================================= */

.cloudright-modal {
    position: relative;
    width: 520px;
    max-width: 100%;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.30);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Arial, sans-serif;
}


/* =========================================================
   HEADER
   ========================================================= */

.cloudright-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}


.cloudright-brand {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.3px;
}


.cloudright-subtitle {
    margin-top: 3px;
    font-size: 13px;
    color: #64748b;
}


.cloudright-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #64748b;
    font-size: 25px;
    line-height: 32px;
    cursor: pointer;
    transition: all 0.2s ease;
}


.cloudright-close:hover {
    background: #e5e7eb;
    color: #111827;
}


/* =========================================================
   CONTENT
   ========================================================= */

.cloudright-content {
    padding: 24px 26px 26px;
    max-height: calc(90vh - 85px);
    overflow-y: auto;
}


.cloudright-payment-title {
    font-size: 17px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}


/* =========================================================
   CART ITEMS
   ========================================================= */

.cloudright-cart-items {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}


.cloudright-cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: #ffffff;
    border-bottom: 1px solid #edf0f2;
}


.cloudright-cart-item:last-child {
    border-bottom: 0;
}


/* =========================================================
   PRODUCT IMAGE
   ========================================================= */

.cloudright-item-image-wrapper {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
}


.cloudright-item-image {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 9px;
    border: 1px solid #e5e7eb;
}


.cloudright-item-image-placeholder {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 9px;
    font-size: 24px;
}


/* =========================================================
   PRODUCT DETAILS
   ========================================================= */

.cloudright-item-details {
    flex: 1;
    min-width: 0;
}


.cloudright-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.35;
    word-break: break-word;
}


.cloudright-item-meta {
    margin-top: 5px;
    font-size: 13px;
    color: #64748b;
}


.cloudright-item-price {
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}


/* =========================================================
   TOTAL
   ========================================================= */

.cloudright-total-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 4px 18px;
}


.cloudright-total-label {
    font-size: 16px;
    color: #64748b;
}


.cloudright-total-price {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}


/* =========================================================
   PAYMENT INFORMATION
   ========================================================= */

.cloudright-payment-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 20px;
}


.cloudright-payment-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e2e8f0;
    color: #334155;
    font-size: 15px;
    font-weight: 700;
}


.cloudright-payment-heading {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}


.cloudright-payment-description {
    margin-top: 2px;
    font-size: 12px;
    color: #64748b;
}


/* =========================================================
   ACTION BUTTONS
   ========================================================= */

.cloudright-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.cloudright-success-button {
    width: 100%;
    padding: 14px 20px;
    border: 0;
    border-radius: 9px;
    background: #111827;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}


.cloudright-success-button:hover {
    background: #1f2937;
    transform: translateY(-1px);
}


.cloudright-success-button:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}


.cloudright-failure-button {
    width: 100%;
    padding: 11px 20px;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    background: #ffffff;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}


.cloudright-failure-button:hover {
    background: #f8fafc;
    color: #374151;
}


/* =========================================================
   EMPTY CART
   ========================================================= */

.cloudright-empty-cart {
    padding: 30px;
    text-align: center;
    color: #64748b;
}


/* =========================================================
   TOAST
   ========================================================= */

.cloudright-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 24px;
    background: #1f2937;
    color: #ffffff;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .cloudright-overlay {
        padding: 12px;
    }

    .cloudright-modal {
        border-radius: 14px;
    }

    .cloudright-header {
        padding: 18px 20px;
    }

    .cloudright-content {
        padding: 20px;
    }

    .cloudright-item-image-wrapper,
    .cloudright-item-image,
    .cloudright-item-image-placeholder {
        width: 50px;
        height: 50px;
    }

    .cloudright-item-name {
        font-size: 14px;
    }

    .cloudright-total-price {
        font-size: 21px;
    }
}

.cloudright-error {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #f1b5b5;
    border-radius: 8px;
    background: #fff4f4;
    color: #b42318;
    font-size: 14px;
    line-height: 1.4;
}
