/**
 * LittleBill Loyalty Styles
 * Custom styles for loyalty program components
 */

/* Checkout Loyalty Section */
#littlebill-loyalty-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin: 20px 0;
}

#littlebill-loyalty-section h3 {
    color: #007cba;
    margin-bottom: 15px;
    font-size: 1.2em;
}

#littlebill-loyalty-section p {
    margin-bottom: 15px;
    color: #495057;
}

/* Phone Input Styling */
#littlebill_phone {
    width: 100%;
    padding: 12px;
    border: 2px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

#littlebill_phone:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

#littlebill_phone.error {
    border-color: #dc3545;
}

/* Loyalty Benefits */
.loyalty-benefits {
    margin-top: 20px;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 4px;
    border-left: 4px solid #007cba;
}

.loyalty-benefits h4 {
    margin-top: 0;
    color: #007cba;
    font-size: 1.1em;
}

.loyalty-benefits ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.loyalty-benefits li {
    margin-bottom: 8px;
    color: #495057;
}

/* My Account Loyalty Section */
.littlebill-loyalty-account {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 30px;
}

.littlebill-loyalty-account h2 {
    color: #007cba;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.loyalty-points {
    margin-bottom: 25px;
}

.loyalty-points h3 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.points-display {
    font-size: 1.3em;
    font-weight: bold;
    color: #28a745;
    background: #d4edda;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #c3e6cb;
}

.loyalty-info h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.loyalty-info ul {
    padding-left: 20px;
}

.loyalty-info li {
    margin-bottom: 10px;
    color: #495057;
}

/* Join Loyalty Form */
.littlebill-join-loyalty {
    background: #fff3cd;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
    margin-bottom: 30px;
}

.littlebill-join-loyalty h2 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.littlebill-join-loyalty p {
    color: #856404;
    margin-bottom: 20px;
    line-height: 1.6;
}

.littlebill-join-loyalty .form-row {
    margin-bottom: 20px;
}

.littlebill-join-loyalty label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #856404;
}

.littlebill-join-loyalty input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.littlebill-join-loyalty input[type="tel"]:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.littlebill-join-loyalty button {
    background: #007cba;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.littlebill-join-loyalty button:hover {
    background: #005a87;
}

.littlebill-join-loyalty button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Messages */
#littlebill-message {
    margin-top: 15px;
}

#littlebill-message .woocommerce-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin: 0;
}

#littlebill-message .woocommerce-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 12px;
    border-radius: 4px;
    margin: 0;
}

#littlebill-message .woocommerce-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin: 0;
}

/* New Client Creation Fields */
#littlebill-new-client-fields {
    margin-top: 20px;
    padding: 20px;
    background: #fff3cd;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
}

#littlebill-new-client-fields h4 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 1.2em;
}

#littlebill-new-client-fields p {
    color: #856404;
    margin-bottom: 20px;
    line-height: 1.6;
}

.littlebill-create-account-info {
    margin: 20px 0;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 4px;
    border-left: 4px solid #007cba;
}

.littlebill-create-account-info p {
    margin-bottom: 10px;
    color: #495057;
}

.littlebill-create-account-info ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.littlebill-create-account-info li {
    margin-bottom: 8px;
    color: #495057;
}

.littlebill-create-account-button {
    margin-top: 20px;
    text-align: center;
}

#littlebill-create-account-btn {
    background: #007cba;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 200px;
}

#littlebill-create-account-btn:hover {
    background: #005a87;
}

#littlebill-create-account-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Date of Birth Field */
#littlebill_date_of_birth {
    width: 100%;
    padding: 12px;
    border: 2px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

#littlebill_date_of_birth:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Admin Styles */
.littlebill-dependent {
    transition: opacity 0.3s ease;
}

.littlebill-dependent.hidden {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    #littlebill-loyalty-section,
    .littlebill-loyalty-account,
    .littlebill-join-loyalty {
        padding: 15px;
    }
    
    .points-display {
        font-size: 1.1em;
        padding: 12px;
    }
    
    .littlebill-join-loyalty button {
        width: 100%;
        padding: 15px;
    }
}

/* Loading States */
.littlebill-loading {
    opacity: 0.6;
    pointer-events: none;
}

.littlebill-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 #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success States */
.littlebill-success {
    border-color: #28a745 !important;
    background-color: #d4edda !important;
}

/* Error States */
.littlebill-error {
    border-color: #dc3545 !important;
    background-color: #f8d7da !important;
}

/* Tooltip Styles */
.littlebill-tooltip {
    position: relative;
    display: inline-block;
}

.littlebill-tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.littlebill-tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Pending Status Styles */
.littlebill-pending-checkout {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.littlebill-pending-checkout .woocommerce-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.littlebill-pending-checkout p {
    margin-bottom: 10px;
    color: #856404;
}

.littlebill-pending-checkout small {
    color: #6c757d;
    font-style: italic;
}

.littlebill-pending-status {
    background: #fff3cd;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
    margin-bottom: 20px;
}

.littlebill-pending-status h2 {
    color: #856404;
    margin-bottom: 15px;
}

.pending-message {
    margin-bottom: 20px;
}

.pending-message .woocommerce-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.phone-info {
    font-weight: bold;
    color: #495057;
}

.pending-info h3 {
    color: #856404;
    margin-bottom: 10px;
}

.pending-info ul {
    list-style-type: disc;
    margin-left: 20px;
}

.pending-info li {
    margin-bottom: 5px;
    color: #6c757d;
}

.help-text {
    font-style: italic;
    color: #6c757d;
    margin-top: 15px;
}

/* Print Styles */
@media print {
    #littlebill-loyalty-section,
    .littlebill-loyalty-account,
    .littlebill-join-loyalty,
    .littlebill-pending-checkout,
    .littlebill-pending-status {
        display: none;
    }
} 