/**
 * TIP 打赏功能 - 样式文件
 * 
 * @package eMarket Child Theme
 */

/* ========== Overlay ========== */
.tip-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

/* ========== Modal Container ========== */
.tip-modal-container {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    animation: tipSlideIn 0.3s ease-out;
}

@keyframes tipSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Modal Content ========== */
.tip-modal-content {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
}

/* ========== Close Button ========== */
.tip-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
}

.tip-modal-close:hover {
    color: #ff1493;
    background: white;
    transform: rotate(90deg);
}

/* ========== Header ========== */
.tip-modal-header {
    background: linear-gradient(135deg, #fff0f5 0%, #ffe4ec 100%);
    padding: 20px;
    border-bottom: 2px solid #ffb6c1;
}

.tip-modal-title-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tip-modal-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.tip-modal-title-text {
    flex: 1;
}

.tip-modal-title {
    font-size: 20px;
    font-weight: bold;
    color: #ff1493;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.tip-modal-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* ========== Body Compact ========== */
.tip-modal-body-compact {
    padding: 20px;
}

/* ========== Amount Grid Compact ========== */
.tip-amount-grid-compact {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.tip-amount-btn-compact {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    min-width: 0;
}

.tip-amount-btn-compact:hover {
    background: #fff0f5;
    border-color: #ffb6c1;
    transform: translateY(-1px);
}

.tip-amount-btn-compact.active {
    background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
    border-color: #ff1493;
    color: white;
    box-shadow: 0 3px 10px rgba(255, 20, 147, 0.3);
}

/* ========== Custom Amount Compact ========== */
.tip-custom-amount-compact {
    position: relative;
    margin-bottom: 12px;
}

.tip-custom-amount-compact .tip-currency-symbol {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #666;
    font-weight: 600;
    z-index: 1;
}

.tip-custom-input-compact {
    width: 100%;
    padding: 10px 12px 10px 30px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.tip-custom-input-compact:focus {
    outline: none;
    border-color: #ff69b4;
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.1);
}

/* ========== Selected Amount Display Compact ========== */
.tip-selected-amount-compact {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tip-selected-amount-compact .tip-label {
    font-size: 13px;
    color: #666;
}

.tip-selected-amount-compact .tip-amount-display {
    font-size: 24px;
    font-weight: bold;
    color: #ff1493;
}

/* ========== Error Message ========== */
.tip-error-message {
    background: #fff0f0;
    color: #dc3545;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
    border-left: 3px solid #dc3545;
}

/* ========== Footer Compact ========== */
.tip-modal-footer-compact {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* ========== PayPal Button Container ========== */
.tip-paypal-button-container {
    min-height: 45px;
    margin-bottom: 10px;
    display: none;
}

/* ========== Loading State ========== */
.tip-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tip-loading .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff69b4;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

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

/* ========== Success Message ========== */
.tip-success-message {
    text-align: center;
    padding: 20px;
}

.tip-success-message h3 {
    font-size: 20px;
    color: #28a745;
    margin: 0 0 10px 0;
}

.tip-success-message p {
    color: #666;
    margin: 5px 0;
}

/* ========== Confirm Button ========== */
.tip-confirm-btn {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.3);
}

.tip-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.4);
}

.tip-confirm-btn:active {
    transform: translateY(0);
}

/* ========== Responsive Design ========== */
@media (max-width: 480px) {
    .tip-modal-container {
        width: 95%;
        max-width: none;
    }
    
    .tip-amount-grid-compact {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .tip-modal-title {
        font-size: 18px;
    }
}
