/* Tip Modal Styles */

.tip-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tip-modal {
    background: white;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tip-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tip-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.tip-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.tip-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.tip-modal-body {
    padding: 24px;
}

.tip-recipient {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 12px;
    margin-bottom: 24px;
}

.tip-recipient-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.tip-recipient-info {
    flex: 1;
}

.tip-recipient-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.tip-recipient-username {
    font-size: 14px;
    color: #6b7280;
}

.tip-amount-section {
    margin-bottom: 20px;
}

.tip-amount-section label,
.tip-message-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.tip-amount-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.tip-currency-symbol {
    position: absolute;
    left: 16px;
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    pointer-events: none;
}

.tip-amount-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s;
}

.tip-amount-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.tip-amount-quick-select {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.tip-quick-btn {
    flex: 1;
    padding: 10px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.tip-quick-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
}

.tip-quick-btn:active {
    transform: translateY(0);
}

.tip-amount-range {
    margin-top: 8px;
    text-align: center;
}

.tip-amount-range small {
    color: #6b7280;
    font-size: 12px;
}

.tip-premium-section {
    padding: 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    margin-bottom: 20px;
}

.tip-premium-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
}

.tip-premium-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.tip-premium-cost {
    margin-left: auto;
    color: #b45309;
    font-size: 13px;
}

.tip-premium-desc {
    margin: 8px 0 0 30px;
    font-size: 12px;
    color: #78350f;
}

.tip-message-section {
    margin-bottom: 20px;
}

.tip-message-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: all 0.2s;
}

.tip-message-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.tip-message-count {
    text-align: right;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.tip-total-section {
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.tip-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: #6b7280;
}

.tip-total-row.tip-total-final {
    border-top: 2px solid #e5e7eb;
    margin-top: 8px;
    padding-top: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.tip-total-amount {
    color: #667eea;
}

.tip-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
}

.tip-modal-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tip-modal-cancel {
    background: #f3f4f6;
    color: #374151;
}

.tip-modal-cancel:hover {
    background: #e5e7eb;
}

.tip-modal-send {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tip-modal-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.tip-modal-send:active {
    transform: translateY(0);
}

.tip-modal-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tip-modal-overlay {
        padding: 10px;
        align-items: center;
    }
    
    .tip-modal {
        max-width: 100%;
        margin: 0;
        max-height: calc(100vh - 80px);
    }
    
    .tip-modal-header {
        padding: 12px 16px;
    }
    
    .tip-modal-header h3 {
        font-size: 18px;
    }
    
    .tip-modal-close {
        width: 28px;
        height: 28px;
        font-size: 24px;
    }
    
    .tip-modal-body {
        padding: 16px;
    }
    
    .tip-recipient {
        padding: 12px;
        margin-bottom: 16px;
        gap: 10px;
    }
    
    .tip-recipient-avatar {
        width: 40px;
        height: 40px;
    }
    
    .tip-recipient-name {
        font-size: 15px;
    }
    
    .tip-recipient-username {
        font-size: 13px;
    }
    
    .tip-amount-section {
        margin-bottom: 16px;
    }
    
    .tip-amount-section label,
    .tip-message-section label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .tip-amount-input-group {
        margin-bottom: 10px;
    }
    
    .tip-currency-symbol {
        left: 12px;
        font-size: 16px;
    }
    
    .tip-amount-input {
        padding: 10px 12px 10px 36px;
        font-size: 15px;
    }
    
    .tip-amount-quick-select {
        gap: 6px;
        margin-top: 8px;
    }
    
    .tip-quick-btn {
        padding: 8px 6px;
        font-size: 13px;
    }
    
    .tip-amount-range {
        margin-top: 6px;
    }
    
    .tip-premium-section {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .tip-premium-checkbox {
        font-size: 13px;
        gap: 8px;
    }
    
    .tip-premium-checkbox input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
    
    .tip-premium-desc {
        margin: 6px 0 0 26px;
        font-size: 11px;
    }
    
    .tip-message-section {
        margin-bottom: 16px;
    }
    
    .tip-message-input {
        padding: 10px 12px;
        font-size: 13px;
        min-height: 60px;
    }
    
    .tip-total-section {
        padding: 12px;
    }
    
    .tip-total-row {
        padding: 6px 0;
        font-size: 13px;
    }
    
    .tip-total-row.tip-total-final {
        padding-top: 10px;
        margin-top: 6px;
        font-size: 16px;
    }
    
    .tip-modal-footer {
        padding: 12px 16px;
        gap: 10px;
    }
    
    .tip-modal-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}
