/* TipJoy Frontend Styles (Free Version)
 *
 * Default color palette: Neutral Slate + Blue accent
 * Designed to blend with any WordPress theme.
 */

/* =============================================
   Inline Section Wrapper
   ============================================= */
.tipjoy-inline-section {
    margin: 20px 0;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
}

/* =============================================
   Tip Widget - Compact Row Design
   ============================================= */
.tipjoy-widget-content {
    padding: 0;
}

.tipjoy-header {
    margin-bottom: 10px;
}

.tipjoy-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    font-style: italic;
    color: #1E293B;
    line-height: 1.4;
}

.tipjoy-description {
    margin: 4px 0 0;
    font-size: 13px;
    color: #64748B;
    line-height: 1.4;
    font-style: normal;
}

/* Option buttons — flex row, wraps when container is narrow */
.tipjoy-options-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
    width: auto;
}

.tipjoy-opt {
    padding: 8px 14px !important;
    border: 1.5px solid #CBD5E1 !important;
    background: #fff !important;
    cursor: pointer;
    font-size: 14px !important;
    font-weight: 500;
    color: #334155 !important;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.4;
    margin: 0;
    position: relative;
    flex-shrink: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
}

/* All buttons get uniform small radius — works when they wrap */
.tipjoy-opt {
    border-radius: 6px !important;
    margin: 0 6px 6px 0 !important;
}

.tipjoy-opt:hover {
    background: #F8FAFC !important;
    border-color: #2563EB !important;
    color: #1E40AF !important;
    z-index: 1;
}

.tipjoy-opt.active,
.tipjoy-opt.active:hover,
.tipjoy-opt.active:focus {
    border-color: #2563EB !important;
    background: #EFF6FF !important;
    color: #1D4ED8 !important;
    font-weight: 600;
    z-index: 2;
    box-shadow: none !important;
    outline: none !important;
}

/* "No tips" button subtle style */
.tipjoy-opt--notip {
    color: #64748B !important;
}

.tipjoy-opt--notip.active {
    color: #1D4ED8 !important;
    background: #EFF6FF !important;
}

/* Custom amount shown on Other button */
.tipjoy-opt--has-custom {
    min-width: 60px;
    text-align: center;
}

/* Custom amount input row — single line: [$][input] */
.tipjoy-custom-row {
    margin-top: 8px !important;
    padding: 0 !important;
}

.tipjoy-custom-input-wrap {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    border: 1.5px solid #CBD5E1 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    transition: border-color 0.15s;
    max-width: 180px;
    height: 38px;
    background: #fff;
}

.tipjoy-custom-input-wrap:focus-within {
    border-color: #2563EB !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.tipjoy-custom-prefix {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 10px !important;
    margin: 0 !important;
    background: #F8FAFC !important;
    color: #64748B !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border: none !important;
    border-right: 1.5px solid #CBD5E1 !important;
    line-height: 1 !important;
    user-select: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.tipjoy-custom-input {
    display: inline-block !important;
    flex: 1 1 auto !important;
    padding: 0 10px !important;
    margin: 0 !important;
    border: none !important;
    font-size: 15px !important;
    color: #334155 !important;
    outline: none !important;
    background: transparent !important;
    width: 100% !important;
    min-width: 0;
    height: 100% !important;
    box-shadow: none !important;
    -moz-appearance: textfield;
}

.tipjoy-custom-input::placeholder {
    color: #94A3B8;
}

.tipjoy-custom-input:focus {
    outline: none !important;
    box-shadow: none !important;
}

.tipjoy-custom-input::-webkit-outer-spin-button,
.tipjoy-custom-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Message area */
.tipjoy-message {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
}

.tipjoy-message.success {
    background: #F0FDF4;
    color: #166534;
    border: 1px solid #BBF7D0;
}

.tipjoy-message.error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* =============================================
   Tip Confirmed State
   ============================================= */
.tipjoy-confirmed-section {
    text-align: center;
}

.tipjoy-confirmed {
    text-align: center;
    padding: 24px 20px;
}

.tipjoy-confirmed-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: #F0FDF4;
    border: 2px solid #BBF7D0;
    border-radius: 50%;
    line-height: 48px;
    font-size: 24px;
    color: #166534;
}

.tipjoy-confirmed-message {
    font-size: 15px;
    margin-bottom: 4px;
    color: #334155;
}

.tipjoy-confirmed-amount {
    font-size: 22px;
    font-weight: 700;
    color: #1D4ED8;
    margin-bottom: 12px;
}

.tipjoy-remove-tip {
    display: inline-block;
    font-size: 13px;
    color: #94A3B8;
    text-decoration: underline;
    cursor: pointer;
}

.tipjoy-remove-tip:hover {
    color: #64748B;
}

/* =============================================
   Mobile Responsive
   ============================================= */
@media (max-width: 480px) {
    .tipjoy-opt {
        padding: 7px 10px !important;
        font-size: 13px !important;
    }

    .tipjoy-custom-input-wrap {
        max-width: 100%;
    }
}
