/* Webo Domain Tino Plugin Styles */

/* Base Styles */
.webo-domain-check,
.webo-domain-pricing,
.webo-domain-form-full {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 100%;
    margin: 20px 0;
}

/* Alert Messages */
.webo-alert {
    padding: 12px 16px;
    margin: 10px 0;
    border-radius: 4px;
    border-left: 4px solid;
    font-weight: 500;
}

.webo-alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.webo-alert-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.webo-alert-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.webo-alert-info {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Domain Check Form */
.webo-domain-form {
    margin-bottom: 20px;
}

.webo-form-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.webo-domain-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

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

.webo-check-btn {
    padding: 12px 24px;
    background-color: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.webo-check-btn:hover {
    background-color: #005a87;
}

.webo-check-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Pricing Table */
.webo-pricing-table {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.webo-pricing-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.webo-pricing-header h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
}

#webo-search-tld {
    width: 100%;
    max-width: 300px;
    padding: 10px 15px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

#webo-search-tld::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.webo-table-wrapper {
    max-height: 400px;
    overflow-y: auto;
}

.webo-pricing-table-content {
    width: 100%;
    border-collapse: collapse;
}

.webo-pricing-table-content thead th {
    background-color: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.webo-pricing-table-content tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.webo-pricing-table-content tbody tr:hover td {
    background-color: #f8f9fa;
}

/* Price type colors */
.webo-price-cheap td {
    background-color: #d4edda;
}

.webo-price-medium td {
    background-color: #fff3cd;
}

.webo-price-expensive td {
    background-color: #f8d7da;
}

/* TLD Additional Forms */
.webo-tld-forms {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.webo-tld-forms h4 {
    margin-top: 0;
    color: #495057;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.webo-tld-form-item {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.webo-tld-form-item h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #495057;
    font-size: 16px;
}

.webo-form-description {
    margin-bottom: 15px;
    color: #6c757d;
    font-style: italic;
}

.webo-form-field select,
.webo-form-field input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.webo-form-field select:focus,
.webo-form-field input[type="text"]:focus {
    outline: none;
    border-color: #007cba;
}

.webo-dns-support,
.webo-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.webo-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.webo-checkbox-label:hover {
    background-color: #f8f9fa;
}

.webo-checkbox-label input[type="checkbox"] {
    margin: 0;
    width: auto;
}

.webo-checkbox-text {
    flex: 1;
    font-weight: 500;
}

.webo-price {
    color: #28a745;
    font-weight: 600;
    font-size: 12px;
}

.webo-form-info {
    padding: 10px;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 12px;
    color: #6c757d;
}





/* Sections */
.webo-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: white;
}

.webo-section h3 {
    margin-top: 0;
    color: #495057;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

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

.webo-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Tino-style Interface */
.webo-domain-check {
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

/* Header Section */
.webo-header-section {
    background: #fff;
    color: #1a1a1a;
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.webo-main-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 0 20px 0;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.webo-subtitle {
    font-size: 1.375rem;
    margin: 0;
    color: #666;
    font-weight: 400;
    line-height: 1.4;
}

/* Search Section */
.webo-search-section {
    padding: 0 0 60px;
    background: #fff;
    text-align: center;
}

.webo-search-container {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.webo-search-container:focus-within {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.webo-domain-input {
    flex: 1;
    padding: 20px 28px;
    border: none;
    font-size: 20px;
    outline: none;
    background: transparent;
    color: #1a1a1a;
    font-weight: 500;
}

.webo-domain-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.webo-search-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 36px;
    background: #10b981;
    color: white;
    border: none;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.webo-search-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.webo-search-btn:active {
    transform: translateY(0);
}

/* Results Section */
.webo-results-section {
    padding: 0 0 60px;
    background: #fff;
}

.webo-domain-results {
    margin: 0 auto;
    padding: 0 20px;
}

/* Main Domain */
.webo-main-domain {
    margin-bottom: 0;
}

.webo-domain-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.webo-domain-card.webo-available {
    border-color: #10b981;
    background: #fff;
}

.webo-domain-card.webo-unavailable {
    border-color: #ef4444;
    background: #fff;
}

.webo-domain-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.webo-domain-name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

.webo-availability-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.webo-availability-badge.available {
    background: #10b981;
    color: white;
}

.webo-availability-badge.unavailable {
    background: #ef4444;
    color: white;
}

.webo-domain-pricing {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 20px;
}

.webo-price-main {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -0.01em;
}

.webo-domain-card.webo-unavailable .webo-price-main {
    color: #ef4444;
}

.webo-price-sub {
    font-size: 0.875rem;
    color: #10b981;
    font-weight: 600;
    margin: 0;
}

.webo-choose-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.webo-choose-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    color: white;
    text-decoration: none;
}

.webo-choose-btn:active {
    transform: translateY(0);
}

/* Other Results */
.webo-other-results {
    margin-top: 0;
}

.webo-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 32px 0 24px;
}

.webo-other-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.webo-other-header h4 {
    margin: 0;
    font-size: 1.25rem;
    color: #1a1a1a;
    font-weight: 700;
}

.webo-ai-suggestion {
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
    font-weight: 500;
}

.webo-other-domain {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    z-index: 1;
}

/* Create unique stacking context for each domain */
.webo-other-domain:nth-child(1) { z-index: 1; }
.webo-other-domain:nth-child(2) { z-index: 2; }
.webo-other-domain:nth-child(3) { z-index: 3; }
.webo-other-domain:nth-child(4) { z-index: 4; }
.webo-other-domain:nth-child(5) { z-index: 5; }
.webo-other-domain:nth-child(6) { z-index: 6; }
.webo-other-domain:nth-child(7) { z-index: 7; }
.webo-other-domain:nth-child(8) { z-index: 8; }
.webo-other-domain:nth-child(9) { z-index: 9; }
.webo-other-domain:nth-child(10) { z-index: 10; }

.webo-other-domain:hover {
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
    transform: translateY(-1px);
    z-index: 1000;
}

/* Keep active domain (with open popover) above neighbors */
.webo-other-domain.webo-popover-active {
    z-index: 2147483646; /* just below popover */
    position: relative;
}


.webo-other-domain .webo-domain-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.webo-other-domain .webo-domain-name {
    font-size: 1.125rem;
    margin: 0;
    font-weight: 600;
    color: #1a1a1a;
}

.webo-other-domain .webo-domain-pricing {
    margin-right: 20px;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 8px;
}

.webo-other-domain .webo-price-main {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.webo-other-domain .webo-price-sub {
    font-size: 0.875rem;
    color: #10b981;
    font-weight: 600;
}

.webo-other-domain .webo-choose-btn {
    padding: 10px 20px;
    font-size: 13px;
    border-radius: 6px;
}

/* TLD Description */
.webo-tld-description {
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
    font-style: italic;
}

/* Domain Type */
.webo-domain-type {
    font-size: 10px;
    color: #10b981;
    font-weight: 600;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* TLD Info Icon */
.webo-tld-info-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    cursor: pointer;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    color: #6b7280;
    transition: all 0.2s ease;
    flex-shrink: 0;
    z-index: 10000;
}

.webo-tld-info-icon:hover {
    background: #10b981;
    border-color: #10b981;
    color: white;
    transform: scale(1.1);
}

.webo-tld-info-icon svg {
    width: 12px;
    height: 12px;
}

/* TLD Info Popover - Attached to button */
.webo-tld-popover {
    position: absolute;
    background: #1f2937;
    color: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 2147483647 !important;
    min-width: 250px;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    pointer-events: none;
    top: -10px;
    right: 30px;
}

.webo-tld-popover.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.webo-tld-popover::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid #1f2937;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

/* Simple popover z-index */
.webo-tld-popover {
    z-index: 9999;
}


/* Close button */
.webo-tld-popover-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.webo-tld-popover-close:hover {
    background: #374151;
    color: white;
}

.webo-tld-popover h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #f9fafb;
}

.webo-tld-popover ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.webo-tld-popover li {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}

.webo-tld-popover li:last-child {
    margin-bottom: 0;
}

.webo-tld-popover li::before {
    content: '+';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    margin-right: 8px;
    flex-shrink: 0;
}

.webo-tld-popover .fee-item {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.webo-tld-popover .fee-name {
    color: #d1d5db;
}

.webo-tld-popover .fee-amount {
    color: #f9fafb;
    font-weight: 600;
}

/* Loading Spinner */
.webo-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #374151;
    border-top: 2px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Load More Section */
.webo-load-more-section {
    text-align: center;
    margin-top: 24px;
    padding: 20px 0;
}

.webo-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.webo-load-more-btn:hover {
    background: #e9ecef;
    border-color: #10b981;
    color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
    text-decoration: none;
}

.webo-load-more-btn:active {
    transform: translateY(0);
}

.webo-load-more-btn:disabled {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #e5e7eb;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.webo-load-more-btn .webo-spinner {
    display: none;
}

.webo-load-more-btn.loading .webo-spinner {
    display: inline-block;
}

.webo-load-more-btn.loading .webo-load-more-text {
    display: none;
}

/* Loading Container */
.webo-loading-container {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.webo-loading-container .webo-spinner {
    margin: 0 auto 16px;
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.webo-loading-container p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .webo-header-section {
        padding: 60px 20px 40px;
    }
    
    .webo-main-title {
        font-size: 2.5rem;
    }
    
    .webo-subtitle {
        font-size: 1.125rem;
    }
    
    .webo-search-section {
        padding: 0 20px 40px;
    }
    
    .webo-search-container {
        flex-direction: column;
        border-radius: 16px;
    }
    
    .webo-domain-input {
        padding: 18px 20px;
        font-size: 18px;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .webo-search-btn {
        padding: 18px 20px;
        border-radius: 0 0 16px 16px;
    }
    
    .webo-results-section {
        padding: 0 0 40px;
    }
    
    .webo-domain-results {
        padding: 0 20px;
    }
    
    .webo-domain-card {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .webo-domain-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .webo-domain-name {
        font-size: 1.125rem;
    }
    
    .webo-domain-pricing {
        margin-right: 0;
        justify-content: center;
    }
    
    .webo-price-main {
        font-size: 1rem;
    }
    
    .webo-other-domain {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 16px;
    }
    
    .webo-other-domain .webo-domain-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .webo-other-domain .webo-domain-pricing {
        margin-right: 0;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
    }
    
    .webo-other-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .webo-tld-popover {
        right: -50px;
        min-width: 200px;
    }
    
    .webo-other-header h4 {
        font-size: 1.125rem;
    }
}
