/* 藍新金流捐款外掛樣式 */

.newebpay-donation-container {
    display: inline-block;
    margin: 10px 0;
}

.newebpay-donation-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    display: inline-block;
}

.newebpay-donation-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.newebpay-donation-button:active {
    transform: translateY(0);
}

/* 彈出視窗樣式 */
.newebpay-donation-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.newebpay-donation-modal-content {
    background-color: #fefefe;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.newebpay-donation-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 15px;
}

.newebpay-donation-close:hover,
.newebpay-donation-close:focus {
    color: #000;
    text-decoration: none;
}

.newebpay-donation-modal h3 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
    text-align: center;
    margin-bottom: 10px;
}

.newebpay-donation-modal p {
    color: #666;
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* 金額選擇樣式 */
.amount-selection {
    margin-bottom: 25px;
}

.amount-selection label {
    display: block;
    margin-bottom: 15px;
    font-weight: bold;
    color: #333;
}

.amount-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.amount-btn {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    color: #495057;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.amount-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.amount-btn.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.custom-amount {
    margin-top: 15px;
}

.custom-amount input {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.custom-amount input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 咖啡金額顯示 */
.coffee-amount {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border-radius: 10px;
    color: #fff;
}

.coffee-amount p {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 捐款者資訊樣式 */
.donor-info {
    margin-bottom: 25px;
}

.donor-info input,
.donor-info textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.donor-info input:focus,
.donor-info textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.donor-info textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* 提交按鈕樣式 */
.submit-donation {
    width: 100%;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.submit-donation:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
}

.submit-donation:active {
    transform: translateY(0);
}

.submit-donation:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 載入狀態 */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 響應式設計 */
@media (max-width: 768px) {
    .newebpay-donation-modal-content {
        padding: 20px;
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .amount-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .newebpay-donation-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .amount-buttons {
        grid-template-columns: 1fr;
    }
    
    .newebpay-donation-modal h3 {
        font-size: 20px;
    }
}