/* ========================================
   TIP MODAL - Professional & Minimalistic
   ======================================== */

/* Modal Overlay */
.tip-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 20px;
}

.tip-modal.active {
    opacity: 1;
    visibility: visible;
}

.tip-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

/* Modal Container - Compact & Centered */
.tip-container {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: #2a2e3a;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    z-index: 10000;
    overflow: hidden;
}

.tip-modal.active .tip-container {
    transform: scale(1);
    opacity: 1;
}

/* Header */
.tip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tip-header-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tip-icon {
    font-size: 20px;
    line-height: 1;
}

.tip-title {
    font-size: 17px;
    font-weight: 600;
    color: #e4e6eb;
    margin: 0;
    letter-spacing: -0.01em;
}

.tip-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #b0b3b8;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tip-close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #e4e6eb;
}

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

/* Booster Info - Compact */
.tip-booster-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.tip-booster-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a9eff, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.tip-booster-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tip-booster-name {
    font-size: 14px;
    font-weight: 600;
    color: #e4e6eb;
    letter-spacing: -0.01em;
}

.tip-booster-subtitle {
    font-size: 12px;
    color: #b0b3b8;
    font-weight: 400;
}

/* Form Sections */
.tip-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tip-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tip-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #e4e6eb;
    margin: 0;
    letter-spacing: -0.01em;
}

.tip-label-optional {
    font-size: 12px;
    font-weight: 400;
    color: #8a8d91;
}

.tip-input-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #b0b3b8;
    margin-bottom: 6px;
}

/* Quick Amount Buttons - Compact */
.tip-quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.tip-amount-btn {
    padding: 10px 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #e4e6eb;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.tip-amount-btn:hover {
    border-color: #4a9eff;
    background: rgba(74, 158, 255, 0.1);
    transform: translateY(-1px);
}

.tip-amount-btn.active {
    border-color: #4a9eff;
    background: #4a9eff;
    color: white;
    box-shadow: 0 2px 8px rgba(74, 158, 255, 0.4);
}

.tip-amount-value {
    position: relative;
    z-index: 1;
}

/* Custom Amount Input - Compact */
.tip-custom-input {
    margin-top: 6px;
}

.tip-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.tip-currency {
    position: absolute;
    left: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #b0b3b8;
    pointer-events: none;
    z-index: 1;
}

#tipAmountInput {
    width: 100%;
    padding: 12px 14px 12px 32px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #e4e6eb;
    transition: all 0.2s ease;
}

#tipAmountInput:focus {
    outline: none;
    border-color: #4a9eff;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.15);
}

#tipAmountInput::placeholder {
    color: #606770;
    font-weight: 400;
}

/* Message Textarea - Compact */
.tip-textarea-wrapper {
    position: relative;
}

#tipMessage {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    font-size: 13px;
    color: #e4e6eb;
    resize: none;
    font-family: inherit;
    line-height: 1.4;
    transition: all 0.2s ease;
}

#tipMessage:focus {
    outline: none;
    border-color: #4a9eff;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.15);
}

#tipMessage::placeholder {
    color: #606770;
}

.tip-char-count {
    position: absolute;
    right: 10px;
    bottom: 10px;
    font-size: 11px;
    font-weight: 500;
    color: #606770;
    pointer-events: none;
}

/* Preview Section - Compact */
.tip-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(74, 158, 255, 0.12);
    border: 1px solid rgba(74, 158, 255, 0.25);
    border-radius: 8px;
    animation: tipPreviewSlide 0.3s ease;
}

@keyframes tipPreviewSlide {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tip-preview-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4a9eff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tip-preview-icon i {
    font-size: 16px;
    color: white;
}

.tip-preview-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tip-preview-label {
    font-size: 11px;
    font-weight: 500;
    color: #b0b3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tip-preview-amount {
    font-size: 18px;
    font-weight: 700;
    color: #4a9eff;
    letter-spacing: -0.02em;
}

/* Submit Button - Professional */
.tip-submit-btn {
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #4a9eff, #3b82f6);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    letter-spacing: -0.01em;
    box-shadow: 0 2px 8px rgba(74, 158, 255, 0.3);
}

.tip-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.4);
}

.tip-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.tip-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.tip-submit-btn i {
    font-size: 14px;
    transition: transform 0.25s ease;
}

.tip-submit-btn:hover:not(:disabled) i {
    transform: translateX(3px);
}

/* Responsive Design - Mobile First */
@media (max-width: 480px) {
    .tip-modal {
        padding: 16px;
    }
    
    .tip-container {
        max-width: 100%;
    }
    
    .tip-header {
        padding: 16px 16px 14px;
    }
    
    .tip-body {
        padding: 16px;
    }
    
    .tip-quick-amounts {
        gap: 6px;
    }
    
    .tip-amount-btn {
        padding: 10px 6px;
        font-size: 13px;
    }
}

/* Dark Theme (already dark by default, but ensure consistency) */
html[data-theme='dark'] .tip-container {
    background: #2a2e3a;
}

html[data-theme='dark'] .tip-overlay {
    background: rgba(0, 0, 0, 0.85);
}

/* Light Theme */
html[data-theme='light'] .tip-container {
    background: #ffffff;
}

html[data-theme='light'] .tip-overlay {
    background: rgba(0, 0, 0, 0.6);
}

html[data-theme='light'] .tip-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

html[data-theme='light'] .tip-title {
    color: #1c1e21;
}

html[data-theme='light'] .tip-close-btn {
    background: rgba(0, 0, 0, 0.05);
    color: #65676b;
}

html[data-theme='light'] .tip-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1c1e21;
}

html[data-theme='light'] .tip-booster-info {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme='light'] .tip-booster-name {
    color: #1c1e21;
}

html[data-theme='light'] .tip-booster-subtitle {
    color: #65676b;
}

html[data-theme='light'] .tip-label {
    color: #1c1e21;
}

html[data-theme='light'] .tip-label-optional {
    color: #65676b;
}

html[data-theme='light'] .tip-input-label {
    color: #65676b;
}

html[data-theme='light'] .tip-amount-btn {
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.03);
    color: #1c1e21;
}

html[data-theme='light'] .tip-amount-btn:hover {
    border-color: #4a9eff;
    background: rgba(74, 158, 255, 0.1);
}

html[data-theme='light'] .tip-currency {
    color: #65676b;
}

html[data-theme='light'] #tipAmountInput,
html[data-theme='light'] #tipMessage {
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.03);
    color: #1c1e21;
}

html[data-theme='light'] #tipAmountInput:focus,
html[data-theme='light'] #tipMessage:focus {
    border-color: #4a9eff;
    background: rgba(0, 0, 0, 0.05);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.2);
}

html[data-theme='light'] #tipAmountInput::placeholder,
html[data-theme='light'] #tipMessage::placeholder {
    color: #8a8d91;
}

html[data-theme='light'] .tip-char-count {
    color: #8a8d91;
}

html[data-theme='light'] .tip-preview-label {
    color: #65676b;
}

