/**
 * Illona UI Components CSS
 * Contains styles for toast notifications, button states, and UI interactions
 * 
 * @package HelloElementorChild
 * @version 2.0.1
 */

/* ========================================
 * TOAST NOTIFICATION SYSTEM
 * ======================================== */

/* Toast Container */
* {
    font-family: "DM Sans", Sans-serif; 
}
.illona-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
    max-width: 400px;
}

/* Toast Base Styles */
.illona-toast {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    padding: 16px 20px;
    pointer-events: auto;
    position: relative;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Toast Animation States */
.illona-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.illona-toast.hide {
    transform: translateX(100%);
    opacity: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    max-height: 0;
}

/* Toast Types */
.illona-toast.success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

.illona-toast.error,
.illona-toast.failed {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fef1f1 100%);
}

.illona-toast.warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fefce8 100%);
}

.illona-toast.info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
}

/* Toast Content */
.illona-toast-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.illona-toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
}

.illona-toast-message {
    flex: 1;
    margin: 0;
    color: #374151;
    font-weight: 500;
}

.illona-toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
    font-size: 18px;
    line-height: 1;
    transition: color 0.2s ease;
    flex-shrink: 0;
    background-color: transparent;
}

.illona-toast-close:hover {
    color: #6b7280;
}

/* Progress Bar */
.illona-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    transform-origin: left;
    transition: transform linear;
}

.illona-toast.success .illona-toast-progress {
    background: #10b981;
}

.illona-toast.error .illona-toast-progress,
.illona-toast.failed .illona-toast-progress {
    background: #ef4444;
}

.illona-toast.warning .illona-toast-progress {
    background: #f59e0b;
}

.illona-toast.info .illona-toast-progress {
    background: #3b82f6;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .illona-toast-container {
        left: 20px;
        right: 20px;
        top: 20px;
        max-width: none;
    }

    .illona-toast {
        transform: translateY(-100%);
    }

    .illona-toast.show {
        transform: translateY(0);
    }

    .illona-toast.hide {
        transform: translateY(-100%);
    }
}

/* ========================================
 * BUTTON LOADING STATES
 * ======================================== */

.btn_clicked {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.btn_clicked::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: illona-spin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

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

/* ========================================
 * FORM STATES
 * ======================================== */

/* Input Error States */
input.error {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 1px #e53e3e !important;
}



/* ========================================
 * LEGACY COMPATIBILITY
 * ======================================== */

/* Hide legacy result message when using toasts */
.illona-toast-container ~ p.result-message {
    display: none !important;
}

/* Ensure toast styles take precedence over theme styles */
.illona-toast * {
    box-sizing: border-box;
} 

/* ========================================
 * PAYMENT FORM STYLES
 * ======================================== */

/* Payment back button */
.payment-back-btn {
    background: none !important;
    border: 1px solid #ddd !important;
    color: #666 !important;
    padding: 8px 16px !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    margin-bottom: 20px !important;
}

.payment-back-btn:hover {
    background: #f9f9f9 !important;
    border-color: #999 !important;
    color: #333 !important;
}

/* Payment selection visual feedback */
.payment-option {
    transition: all 0.2s ease;
}

.payment-option:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.payment-option.active {
    border-color: #9440EE !important;
    box-shadow: 0 0 0 2px rgba(148, 64, 238, 0.2);
}

/* Payment Detail Container */
/* .Payment-Detail-container {
    max-width: 550px;
    margin: 0 auto;
    padding-right: 30px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
} */

.Payment-Detail-container .highlight {
    color: #9440EE;
    font-weight: 700;
}

.Payment-Detail-container .exclaim {
    color: #333;
}

.Payment-Detail-container .subtitle {
    color: #6B7280;
    font-size: 14px;
    margin-bottom: 30px;
}

/* Payment Form Fields */
.payment-field-group {
    margin-bottom: 20px;
}

.payment-field-group label {
    display: block;
    font-weight: 500;
    color: #1E1E1E;
    margin-bottom: 18px;
    font-size: 18px;
}

.payment-input {
    width: 100% !important;
    padding: 14px 20px !important;
    border: 1px solid #D6B6FF !important;
    border-radius: 30px !important;
    font-size: 16px !important;
    background-color: transparent;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.payment-input:focus {
    outline: none !important;
    border-color: #9440EE !important;
    /* background: #FFFFFF !important; */
    box-shadow: 0 0 0 3px rgba(148, 64, 238, 0.1) !important;
}

.payment-input::placeholder {
    color: #9CA3AF !important;
}

/* Card Number with Icon */
.input-with-icon {
    position: relative;
}

.input-with-icon .payment-input {
    padding-right: 50px !important;
}

.card-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Payment Row (Expiry and CVV) */
.payment-row {
    display: flex;
    gap: 16px;
}

.expiry-field {
    flex: 2;
}

.cvv-field {
    flex: 1;
}

/* Expiry Date Inputs */
.expiry-inputs {
    display: flex;
    gap: 12px;
}

.expiry-inputs select {
    flex: 1;
}

.payment-input[type="text"].payment-cvv {
    text-align: center;
}

/* Billing Address Textarea */
.payment-textarea {
    width: 100% !important;
    min-height: 100px !important;
    padding: 14px 20px !important;
    border: 1px solid #D6B6FF !important;
    border-radius: 20px !important;
    font-size: 16px !important;
    background: transparent !important;
    resize: vertical !important;
    font-family: inherit !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    color: #4C4C4C;
    font-weight: 500;
}

.payment-textarea:focus {
    outline: none !important;
    border-color: #9440EE !important;
    /* background: #FFFFFF !important; */
    box-shadow: 0 0 0 3px rgba(148, 64, 238, 0.1) !important;
}

.payment-textarea::placeholder {
    color: #9CA3AF !important;
}

/* Total Amount Section */
.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    /* padding: 20px 0; */
    /* border-top: 1px solid #E5E7EB; */
}

.total-row .total {
    font-size: 24px;
    color: #4C4C4C;
    flex: 1;
    font-weight: 500;
}

.total-row .amount {
    font-size: 24px;
    color: #9440EE;
    font-weight: 700;
}

/* Payment Button */
.payment-button {
  width: 100% !important;
  padding: 10px !important;
  color: #fff !important;
  font-size: 20px !important;
  border-radius: 40px !important;
  cursor: pointer !important;
  font-weight: 600;
  background-image: linear-gradient(130deg, var(--e-global-color-primary) 0%, var(--e-global-color-secondary) 100%);
  box-shadow: 0px 10px 0px -3px #9440EE;
  border-style: groove;
  border-width: 5px 5px 5px 5px;
  border-color: #fff;
}

/* .payment-button:hover {
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(148, 64, 238, 0.4) !important;
} */

.payment-button:active {
    transform: translateY(0) !important;
}

/* Security Text */
.secure {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 12px !important;
    color: #6B7280 !important;
    margin: 0 !important;
}

.secure svg {
    flex-shrink: 0;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .Payment-Detail-container {
        padding: 20px 15px;
    }
    
    .payment-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .expiry-inputs {
        gap: 8px;
    }
    
    .payment-input {
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
    
    .total-row .amount {
        font-size: 20px;
    }
}

/* Card Number Formatting */
.payment-card-no {
    letter-spacing: 1px;
}

/* Payment form error states */
.payment-input.error,
.payment-textarea.error {
    border-color: #EF4444 !important;
    background: #FEF2F2 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.payment-input.error::placeholder,
.payment-textarea.error::placeholder {
    color: #F87171 !important;
}

/* Success states for completed fields */
.payment-input.valid {
    border-color: #10B981 !important;
    background: #F0FDF4 !important;
}

/* Disable spinner on number inputs */
.payment-input[type="number"]::-webkit-outer-spin-button,
.payment-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.payment-input[type="number"] {
    -moz-appearance: textfield;
}

/* ========================================
 * LOGO UPLOAD & PREVIEW STYLES
 * ======================================== */

/* Logo preview container */
.logo-preview-container {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: start;
}

/* Logo preview card base styles */
.logo-preview-card {
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Uploaded logo card specific styles */
.logo-preview-card.uploaded {
    border-color: #10b981 !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

/* Upload section stays visible */
.upload {
    margin-bottom: 20px;
}

/* File input styling */
.custom-file {
    position: relative;
    display: inline-block;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}


.custom-file .login-button {
    position: relative;
    z-index: 1;
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.custom-file .login-button::before {
    content: '📁';
    font-size: 16px;
}

/* Upload info text */
.upload-info {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.upload-info:hover {
    opacity: 1;
}

/* Preview action buttons */
.preview-actions button {
    transition: all 0.2s ease;
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.preview-actions button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.preview-actions button:active {
    transform: translateY(0);
}



/* Drag and drop styles (future enhancement) */
.upload.drag-over {
    border-color: #9440EE;
    background-color: #f8f9ff;
    transform: scale(1.02);
}

/* Mobile responsive logo preview */
@media (max-width: 768px) {
    .logo-preview-card {
        max-width: 280px !important;
        padding: 15px !important;
    }
    
    .logo-preview-card img {
        max-width: 150px !important;
        max-height: 150px !important;
    }
    
    .preview-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .preview-actions button {
        width: 100%;
        justify-content: center;
    }
}

/* Animation for logo preview appearance */
@keyframes logoPreviewIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.logo-preview-card {
    animation: logoPreviewIn 0.3s ease-out;
}

/* Success checkmark animation */
@keyframes checkmarkBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-1px);
    }
}

.logo-preview-card.uploaded .preview-info p:first-child::before {
    content: '✅';
    display: inline-block;
    margin-right: 8px;
    animation: checkmarkBounce 1s ease-in-out;
}

/* ========================================
 * FORM VALIDATION STYLES
 * ======================================== */

/* Error state for form inputs */
.multi-step-form input.error,
.multi-step-form textarea.error,
.multi-step-form select.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
    background-color: #fef2f2;
}

/* Error state focus */
.multi-step-form input.error:focus,
.multi-step-form textarea.error:focus,
.multi-step-form select.error:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
    outline: none;
}

/* Success state for completed steps */
.multi-step-form input.success,
.multi-step-form textarea.success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
    background-color: #f0fdf4;
}

/* Step indicator styles */
.stepper .element.completed,
.stepper .div.completed,
.stepper .element-2.completed {
    opacity: 1;
}

.stepper .element.active,
.stepper .div.active,
.stepper .element-2.active {
    opacity: 1;
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.stepper .rect.completed,
.stepper .rect-2.completed {
    background-color: #10b981 !important;
}

/* Form step transition animations */
.form-step {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button loading state improvements */
.login-button.btn_clicked {
    position: relative;
    color: transparent !important;
}

.login-button.btn_clicked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Validation feedback text */
.validation-feedback {
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.validation-feedback.error {
    color: #ef4444;
}

.validation-feedback.success {
    color: #10b981;
}

/* Improved form field spacing for error states */
.multi-step-form .form-row-group input.error + input {
    margin-top: 8px;
}

/* Mobile responsiveness for validation */
@media (max-width: 768px) {
    .illona-toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
    }
    
    .illona-toast {
        margin-bottom: 8px;
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* ========================================
 * COMPANY SEARCH RESULTS STYLES
 * ======================================== */

 .company-search-results {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: -18px;
    max-height: 500px;
    overflow-y: auto;
    position: absolute;
    z-index: 1000;
    width: 100%;
}

.search-results-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-results-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.close-results-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-results-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.search-results-content {
    padding: 0;
}

.results-count {
    background: #f1f5f9;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.company-result-item {
    border-bottom: 1px solid #f1f5f9;
    padding: 16px;
    transition: background-color 0.2s ease;
}

.company-result-item:last-child {
    border-bottom: none;
}

.company-result-item:hover {
    background: #f8fafc;
}

.company-info {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.company-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.company-details {
    flex: 1;
    min-width: 0;
}

.company-name {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.company-tagline {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #3b82f6;
    font-weight: 500;
    line-height: 1.3;
}

.company-description {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.4;
}

.company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #64748b;
}
h4.company-name a {
    color: #000;
}
.company-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.company-meta i {
    width: 14px;
    opacity: 0.8;
}

.icon-location::before { content: "📍"; }
.icon-phone::before { content: "📞"; }
.icon-website::before { content: "🌐"; }
.icon-experience::before { content: "⭐"; }

.company-meta a {
    color: #3b82f6;
    text-decoration: none;
}

.company-meta a:hover {
    text-decoration: underline;
}

/* Loading and Error States */
.search-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    color: #64748b;
    font-size: 14px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.no-results,
.search-error {
    padding: 20px 16px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

.search-error {
    color: #ef4444;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .company-search-results {
        margin-top: 10px;
        max-height: 400px;
    }
    
    .search-results-header {
        padding: 10px 12px;
    }
    
    .search-results-header h3 {
        font-size: 15px;
    }
    
    .company-result-item {
        padding: 12px;
    }
    
    .company-info {
        gap: 10px;
    }
    
    .company-logo {
        width: 40px;
        height: 40px;
    }
    
    .company-name {
        font-size: 15px;
    }
    
    .company-tagline {
        font-size: 13px;
    }
    
    .company-description {
        font-size: 13px;
    }
    
    .company-meta {
        gap: 8px;
        font-size: 12px;
    }
    
    .results-count {
        padding: 10px 12px;
        font-size: 13px;
    }
}