/**
 * EZRS Tip Form Styles
 * 
 * Styles for the customer support tip form
 * @package EZRS
 */

/* Form Layout */
.ezrs-tip-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ezrs-tip-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Labels */
.ezrs-tip-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ezrs-tip-optional {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
    text-transform: none;
    font-size: 0.85rem;
}

/* Select Dropdown */
.ezrs-tip-select-wrapper {
    position: relative;
}

.ezrs-tip-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
}

.ezrs-tip-select:hover,
.ezrs-tip-select:focus {
    border-color: #ffce00;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 206, 0, 0.15);
    color: #fff;
}

.ezrs-tip-select option {
    background: #1a1a2e;
    color: #fff;
    padding: 0.5rem;
}

.ezrs-tip-select-arrow {
    position: absolute;
    right: 1.25rem;
    top: 20px;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    font-size: 0.7rem;
}

/* Preset Buttons */
.ezrs-tip-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ezrs-tip-preset-btn {
    flex: 1 1 auto;
    min-width: 70px;
    max-width: 100%;
    padding: 0.875rem 0.75rem !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.3 !important;
    min-height: auto !important;
    margin: 0 !important;
    text-shadow: none !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: keep-all !important;
}

.ezrs-tip-preset-btn:hover {
    background: rgba(255, 206, 0, 0.15) !important;
    border-color: rgba(255, 206, 0, 0.5) !important;
    transform: translateY(-2px) !important;
}

.ezrs-tip-preset-btn.active {
    background: linear-gradient(135deg, #ffce00, #e6b800) !important;
    border-color: #ffce00 !important;
    box-shadow: 0 4px 15px rgba(255, 206, 0, 0.4) !important;
}

.ezrs-tip-preset-custom {
    background: rgba(255, 206, 0, 0.1) !important;
    border-color: rgba(255, 206, 0, 0.25) !important;
}

.ezrs-tip-preset-custom:hover {
    background: rgba(255, 206, 0, 0.2) !important;
    border-color: rgba(255, 206, 0, 0.6) !important;
}

.ezrs-tip-preset-custom.active {
    background: linear-gradient(135deg, rgba(255, 206, 0, 0.3), rgba(230, 184, 0, 0.3)) !important;
    border-color: #ffce00 !important;
    box-shadow: 0 4px 15px rgba(255, 206, 0, 0.3) !important;
}

/* Amount Input */
.ezrs-tip-amount-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0 1.25rem;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.ezrs-tip-amount-wrapper.hidden {
    display: none;
}

.ezrs-tip-amount-wrapper:focus-within {
    border-color: #ffce00;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px rgba(255, 206, 0, 0.15);
}

.ezrs-tip-currency {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.25rem;
    font-weight: 600;
}

.ezrs-tip-amount-input {
    flex: 1;
    background-color: transparent !important;
    border: none;
    padding: 1rem 0.75rem;
    color: #fff !important;
    font-size: 1.25rem !important;
    font-weight: 600;
    outline: none;
    min-width: 0;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 0;
    text-align: right;
}

.ezrs-tip-amount-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.ezrs-tip-amount-input::-webkit-inner-spin-button,
.ezrs-tip-amount-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ezrs-tip-amount-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    margin: 0.25rem 0 0;
}

/* Textarea */
.ezrs-tip-textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff !important;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
}

.ezrs-tip-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.ezrs-tip-textarea:hover,
.ezrs-tip-textarea:focus {
    border-color: #ffce00;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 206, 0, 0.15);
}

.ezrs-tip-char-count {
    text-align: right;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

/* Summary Box */
.ezrs-tip-summary {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ezrs-tip-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 0;
}

.ezrs-tip-summary-row strong {
    color: #fff;
}

.ezrs-tip-summary-total {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.1rem;
}

.ezrs-tip-summary-total strong {
    color: #ffce00;
    font-size: 1.25rem;
}

/* Submit Button - uses theme's .primary class for styling */
.ezrs-tip-btn-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.primary:hover .ezrs-tip-btn-icon {
    transform: translateX(4px);
}

/* Loading State */
.primary.loading {
    pointer-events: none;
}

.primary.loading .ezrs-tip-btn-text::after {
    content: '...';
    animation: ezrs-dots 1.5s infinite;
}

@keyframes ezrs-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Success/Error Messages */
.ezrs-tip-message {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
}

.ezrs-tip-message.success {
    background: rgba(39, 174, 96, 0.2);
    border: 1px solid rgba(39, 174, 96, 0.4);
    color: #2ecc71;
}

.ezrs-tip-message.error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #e74c3c;
}

/* Responsive */
@media (max-width: 600px) {
    .ezrs-tip-preset-btn {
        min-width: 65px !important;
        padding: 0.75rem 0.5rem !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 480px) {
    .ezrs-tip-preset-btn {
        min-width: 60px !important;
        padding: 0.7rem 0.4rem !important;
        font-size: 0.85rem !important;
    }
    
    .ezrs-tip-presets {
        gap: 0.4rem;
    }
}

@media (max-width: 380px) {
    .ezrs-tip-preset-btn {
        min-width: 55px !important;
        padding: 0.65rem 0.3rem !important;
        font-size: 0.8rem !important;
    }
    
    .ezrs-tip-presets {
        gap: 0.3rem;
    }
}

