/**
 * Roundup styles for product and cart pages
 */

/* ==========================================
   PRODUCT PAGE MODAL
   ========================================== */

.gcc-pr-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gcc-pr-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.gcc-pr-modal-content {
    position: relative;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: gcc-pr-modal-appear 0.3s ease;
}

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

.gcc-pr-modal-icon {
    color: #4caf50;
    margin-bottom: 20px;
}

.gcc-pr-modal-icon svg {
    width: 64px;
    height: 64px;
}

.gcc-pr-modal-title {
    font-size: 1.4em;
    font-weight: 600;
    margin: 0 0 15px;
    color: #333;
    line-height: 1.3;
}

.gcc-pr-modal-description {
    font-size: 1em;
    color: #666;
    margin: 0 0 25px;
    line-height: 1.5;
}

.gcc-pr-modal-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    font-size: 1.5em;
    font-weight: bold;
}

.gcc-pr-current-qty {
    color: #999;
    text-decoration: line-through;
}

.gcc-pr-arrow {
    color: #4caf50;
}

.gcc-pr-rounded-qty {
    color: #4caf50;
    font-size: 1.2em;
}

.gcc-pr-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.gcc-pr-modal-buttons .button {
    min-width: 140px;
    padding: 12px 25px;
    font-size: 1em;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gcc-pr-modal-buttons .gcc-pr-accept {
    background: #4caf50;
    color: #fff;
    border: none;
}

.gcc-pr-modal-buttons .gcc-pr-accept:hover {
    background: #43a047;
    transform: translateY(-1px);
}

.gcc-pr-modal-buttons .gcc-pr-decline {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.gcc-pr-modal-buttons .gcc-pr-decline:hover {
    background: #e8e8e8;
}

/* Prevent body scroll when modal is open */
body.gcc-pr-modal-open {
    overflow: hidden;
}

/* ==========================================
   CART PAGE PROMPT
   ========================================== */

.gcc-pr-cart-prompt {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    margin: 20px 0;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 1px solid #a5d6a7;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

.gcc-pr-cart-prompt-icon {
    flex-shrink: 0;
    color: #4caf50;
    background: #fff;
    padding: 12px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gcc-pr-cart-prompt-content {
    flex: 1;
}

.gcc-pr-cart-prompt-content h3 {
    margin: 0 0 10px;
    font-size: 1.2em;
    color: #2e7d32;
}

.gcc-pr-cart-prompt-content p {
    margin: 0 0 15px;
    color: #555;
    line-height: 1.5;
}

.gcc-pr-items-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.gcc-pr-items-list li {
    padding: 8px 12px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 5px;
    font-size: 0.9em;
    color: #333;
}

.gcc-pr-items-list li:last-child {
    margin-bottom: 0;
}

.gcc-pr-cart-prompt-action {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.gcc-pr-roundup-all {
    background: #4caf50 !important;
    color: #fff !important;
    border: none !important;
    padding: 15px 30px !important;
    font-size: 1.1em !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap;
}

.gcc-pr-roundup-all:hover {
    background: #43a047 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.gcc-pr-loading {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* ==========================================
   CART ITEM ROUNDUP LINK
   ========================================== */

.gcc-pr-roundup-item {
    color: #4caf50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.gcc-pr-roundup-item:hover {
    color: #2e7d32;
    text-decoration: underline;
}

.gcc-pr-roundup-item.updating {
    color: #999;
    pointer-events: none;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .gcc-pr-modal-content {
        padding: 30px 20px;
        margin: 20px;
    }

    .gcc-pr-modal-title {
        font-size: 1.2em;
    }

    .gcc-pr-modal-buttons {
        flex-direction: column;
    }

    .gcc-pr-modal-buttons .button {
        width: 100%;
    }

    .gcc-pr-cart-prompt {
        flex-direction: column;
        text-align: center;
    }

    .gcc-pr-cart-prompt-icon {
        align-self: center;
    }

    .gcc-pr-cart-prompt-action {
        width: 100%;
    }

    .gcc-pr-roundup-all {
        width: 100%;
    }
}

/* ==========================================
   DARK MODE SUPPORT
   ========================================== */

@media (prefers-color-scheme: dark) {
    .gcc-pr-modal-content {
        background: #2d2d2d;
    }

    .gcc-pr-modal-title {
        color: #fff;
    }

    .gcc-pr-modal-description {
        color: #aaa;
    }

    .gcc-pr-current-qty {
        color: #777;
    }

    .gcc-pr-modal-buttons .gcc-pr-decline {
        background: #444;
        color: #ccc;
        border-color: #555;
    }
}
