/* 
 * Protidinshop Custom Checkout Popup
 * Version: 3.4
 * Primary Color: #ff8300
 */

/* Fullscreen popup overlay */
.protidinshop-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    overflow-y: auto;
    backdrop-filter: blur(5px);
}

/* Popup container */
.protidinshop-popup-container {
    background: #fff;
    min-height: 100vh;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    animation: protidinshop-slideIn 0.3s ease;
}

@keyframes protidinshop-slideIn {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header - Protidinshop Brand Color */
.protidinshop-popup-header {
    background: linear-gradient(135deg, #ff8300, #ff8300);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(255,131,0,0.2);
}

.protidinshop-popup-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.protidinshop-popup-header h3 i {
    font-size: 20px;
    color: #ffffff;
}

.protidinshop-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #ffffff;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.protidinshop-close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

/* Body */
.protidinshop-popup-body {
    padding: 20px;
}

/* Loading */
.protidinshop-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.protidinshop-loading i {
    font-size: 30px;
    color: #ff8300;
    margin-bottom: 10px;
}

.protidinshop-loading span {
    display: block;
    font-size: 14px;
}

/* Section */
.protidinshop-section {
    margin-bottom: 20px;
    background: #fff;
    border-radius: 12px;
}

.section-title {
    color: #333;
    font-size: 16px;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}

.section-title i {
    color: #ff8300;
    font-size: 16px;
}

/* Form group */
.form-group {
    margin-bottom: 12px;
}

.input-box {
    display: flex;
    align-items: center;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    padding: 10px 15px;
    background: #fff;
    transition: all 0.3s;
}

.input-box:focus-within {
    border-color: #ff8300;
    box-shadow: 0 2px 10px rgba(255,131,0,0.05);
}

.icon {
    margin-right: 10px;
    color: #ff8300;
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.input-box input {
    border: none;
    outline: none;
    width: 100%;
    background: transparent;
    font-size: 14px;
    color: #333;
}

.input-box input::placeholder {
    color: #aaa;
    font-size: 13px;
}

/* Product list */
.products-list {
    background: #f2f2f2;
    border-radius: 10px;
    padding: 8px;
}

/* Cart Item */
.cart-item {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: #f2f2f2;
    border-radius: 8px;
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.cart-item:last-child {
    margin-bottom: 0;
}

.cart-item.removing {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s ease;
}

/* Left Image */
.cart-item .left img {
    width: 65px;
    height: 65px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
}

/* Right Section */
.cart-item .right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Title Row */
.cart-item .title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cart-item .title-row h2 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    line-height: 1.2;
}

.cart-item .remove {
    font-size: 18px;
    color: #999;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cart-item .remove:hover {
    color: #ff8300;
    transform: scale(1.2);
}

/* Price Row */
.cart-item .price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 4px;
    border-bottom: 1px dashed #ddd;
}

.cart-item .price-label {
    font-size: 13px;
    color: #ff8300;
    font-weight: 600;
}

.cart-item .price-value {
    font-size: 13px;
    color: #666;
}

/* Quantity Row */
.cart-item .qty-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item .qty-label {
    font-size: 12px;
    color: #666;
}

/* Quantity Controls */
.cart-item .qty-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Round Buttons - Protidinshop Color */
.cart-item .qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    font-size: 15px;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(45deg, #ff8300, #ff8300);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
}

.cart-item .qty-btn:hover {
    transform: scale(1.1);
    background: linear-gradient(45deg, #e67600, #ff8300);
}

.cart-item .qty-number {
    font-size: 12px;
    font-weight: 600;
    min-width: 14px;
    text-align: center;
    color: #333;
}

/* Delivery options */
.delivery-options {
    display: grid;
    gap: 8px;
}

.delivery-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #eef2f7;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: #ffffff;
}

.delivery-option.active {
    border-color: #ff8300;
    background: rgba(255,131,0,0.02);
}

.delivery-option:hover {
    border-color: #ff8300;
}

.delivery-option input[type="radio"] {
    display: none;
}

.option-text {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-text:before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: inline-block;
    transition: all 0.2s;
}

.delivery-option.active .option-text:before {
    border-color: #ff8300;
    background: #ff8300;
    box-shadow: inset 0 0 0 3px #ffffff;
}

.option-price {
    font-weight: 600;
    color: #ff8300;
    font-size: 14px;
}

/* Total section */
.protidinshop-total-section {
    background: #f8fafd;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
}

.grand-total {
    font-size: 18px;
    font-weight: 700;
    color: #ff8300;
    border-top: 1px dashed #ddd;
    padding-top: 10px;
    margin-top: 8px;
}

/* Order button - Protidinshop Brand Color */
.protidinshop-order-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff8300, #ff8300);
    color: #ffffff;
    border: none;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(255,131,0,0.2);
}

.protidinshop-order-btn i {
    font-size: 18px;
    color: #ffffff;
}

.protidinshop-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,131,0,0.3);
    background: linear-gradient(135deg, #e67600, #ff8300);
}

.protidinshop-order-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Notice */
.protidinshop-notice {
    text-align: center;
    margin-top: 15px;
    color: #000000;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.protidinshop-notice i {
    color: #ff8300;
    font-size: 14px;
}

/* Error message */
.protidinshop-error {
    text-align: center;
    padding: 40px;
    color: #ff4444;
    font-size: 14px;
}

/* Animation Effects */

/* Order button pulse animation */
.protidinshop-pulse-animation {
    animation: protidinshop-pulse 2s ease infinite;
}

@keyframes protidinshop-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(255,131,0,0.2);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 12px 25px rgba(255,131,0,0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(255,131,0,0.2);
    }
}

/* Click animation */
.protidinshop-click-animation {
    animation: protidinshop-click 0.2s ease;
}

@keyframes protidinshop-click {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

/* Update flash animation */
.protidinshop-update-flash {
    animation: protidinshop-flash 0.3s ease;
}

@keyframes protidinshop-flash {
    0% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(255,131,0,0.15);
    }
    100% {
        background-color: transparent;
    }
}

/* ======================================== */
/* Success Modal Styles */
/* ======================================== */

.protidinshop-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.protidinshop-success-modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    padding: 30px 25px;
    text-align: center;
    position: relative;
    animation: protidinshop-modalSlideIn 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@keyframes protidinshop-modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.protidinshop-success-modal-content h2 {
    color: #1f2937;
    font-size: 24px;
    margin: 0 0 20px;
    font-weight: 600;
}

/* Order details */
.protidinshop-order-details {
    background: #f9fafb;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: left;
}

.order-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.order-detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    color: #6b7280;
}

.detail-value {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.order-id {
    color: #ff8300;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.copy-order-btn {
    background: #f3f4f6;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    color: #374151;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.copy-order-btn:hover {
    background: #ff8300;
    color: #ffffff;
}

/* Success message */
.protidinshop-success-message {
    background: #fef3c7;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.protidinshop-success-message i {
    color: #f59e0b;
    font-size: 20px;
}

.protidinshop-success-message p {
    margin: 0;
    font-size: 13px;
    color: #92400e;
    text-align: left;
}

/* Modal buttons - Three buttons */
.protidinshop-modal-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.protidinshop-track-btn,
.protidinshop-continue-btn {
    padding: 12px 16px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Desktop - one line three buttons */
@media (min-width: 769px) {
    .protidinshop-modal-buttons {
        flex-wrap: nowrap;
    }
    
    .protidinshop-track-btn,
    .protidinshop-continue-btn {
        flex: 1 1 auto;
        width: auto;
        min-width: auto;
        white-space: nowrap;
    }
}

/* Tablet and Mobile - column layout */
@media (max-width: 768px) {
    .protidinshop-modal-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .protidinshop-track-btn,
    .protidinshop-continue-btn {
        width: 100%;
        white-space: normal;
        padding: 12px;
    }
}

.protidinshop-track-btn {
    background: linear-gradient(135deg, #ff8300, #ff8300);
    color: #ffffff;
}

.protidinshop-track-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,131,0,0.3);
    color: #ffffff;
}

.protidinshop-continue-btn {
    background: #f3f4f6;
    color: #374151;
}

.protidinshop-continue-btn:hover {
    background: #e5e7eb;
    color: #1f2937;
}

/* Responsive */
@media (max-width: 768px) {
    .protidinshop-popup-header {
        padding: 12px 20px;
    }
    
    .protidinshop-popup-header h3 {
        font-size: 18px;
    }
    
    .protidinshop-popup-body {
        padding: 15px;
    }
    
    .cart-item {
        gap: 8px;
    }
    
    .delivery-option {
        padding: 10px 12px;
    }
    
    .protidinshop-order-btn {
        padding: 12px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .protidinshop-popup-header h3 {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 15px;
    }
    
    .input-box {
        padding: 8px 12px;
    }
    
    .cart-item {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .cart-item .left img {
        width: 55px;
        height: 55px;
    }
    
    .cart-item .title-row h2 {
        font-size: 12px;
    }
    
    .qty-control {
        gap: 3px;
    }
    
    .cart-item .qty-btn {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
    
    /* Modal responsive */
    .protidinshop-success-modal-content {
        padding: 25px 20px;
        width: 95%;
    }
    
    .order-detail-row {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .copy-order-btn {
        margin-left: auto;
    }
    
    .protidinshop-success-modal-content h2 {
        font-size: 20px;
    }
}