/* eSIM Compatibility Checker Styles */

.esim-compatibility-checker {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin: 24px 0;
    max-width: 800px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.compatibility-header {
    text-align: center;
    margin-bottom: 32px;
}

.compatibility-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.compatibility-subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Auto Detect Section */
.auto-detect-section {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 12px;
    color: white;
}

.btn-auto-detect {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-auto-detect:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.auto-detect-note {
    margin: 12px 0 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Manual Search Section */
.manual-check-section {
    margin-bottom: 32px;
}

.manual-check-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
}

.device-search {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.device-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.device-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-search-device {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-search-device:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* Brand Selection */
.brand-selection {
    margin-bottom: 32px;
}

.brand-selection h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 20px 0;
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.brand-item {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.brand-item:hover {
    background: #f3f4f6;
    border-color: #3b82f6;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.brand-logo {
    font-size: 2rem;
    margin-bottom: 8px;
}

.brand-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.brand-count {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Results Section */
.compatibility-result {
    margin: 24px 0;
    padding: 24px;
    border-radius: 12px;
    border: 2px solid transparent;
}

.compatibility-result.compatible {
    background: #d1fae5;
    border-color: #10b981;
}

.compatibility-result.not-compatible {
    background: #fee2e2;
    border-color: #ef4444;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.result-icon {
    font-size: 2rem;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.result-title.compatible {
    color: #065f46;
}

.result-title.not-compatible {
    color: #991b1b;
}

.result-details {
    margin-bottom: 16px;
}

.result-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.detail-label {
    font-weight: 600;
    color: #374151;
}

.detail-value {
    color: #1f2937;
}

.setup-instructions {
    margin-top: 20px;
}

.setup-instructions h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.setup-steps {
    list-style: none;
    padding: 0;
    margin: 0;
}

.setup-steps li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: #374151;
}

.setup-steps li:before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: 0;
    top: 8px;
    background: #3b82f6;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.setup-steps {
    counter-reset: step-counter;
}

/* Device List */
.device-list {
    margin: 24px 0;
}

.device-list h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
}

.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.device-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.device-item:hover {
    background: #f3f4f6;
    border-color: #3b82f6;
}

.device-item.compatible {
    border-left: 4px solid #10b981;
}

.device-item.not-compatible {
    border-left: 4px solid #ef4444;
    opacity: 0.7;
}

.device-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.device-brand-logo {
    font-size: 1.2rem;
}

.device-name {
    font-weight: 600;
    color: #1f2937;
    flex: 1;
}

.device-year {
    font-size: 0.85rem;
    color: #6b7280;
}

.device-features {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
}

.device-feature {
    display: flex;
    align-items: center;
    gap: 4px;
}

.device-feature.compatible {
    color: #059669;
}

.device-feature.not-compatible {
    color: #dc2626;
}

/* Info Grid */
.compatibility-info {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

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

.info-icon {
    font-size: 1.5rem;
    margin-top: 4px;
}

.info-content h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.info-content p {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

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

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

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

/* Compact Style */
.esim-compatibility-checker[data-style="compact"] {
    padding: 24px;
}

.esim-compatibility-checker[data-style="compact"] .compatibility-title {
    font-size: 1.5rem;
}

.esim-compatibility-checker[data-style="compact"] .brand-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}

.esim-compatibility-checker[data-style="compact"] .brand-item {
    padding: 16px 12px;
}

/* Minimal Style */
.esim-compatibility-checker[data-style="minimal"] {
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.esim-compatibility-checker[data-style="minimal"] .compatibility-title {
    font-size: 1.25rem;
}

.esim-compatibility-checker[data-style="minimal"] .auto-detect-section {
    padding: 16px;
}

.esim-compatibility-checker[data-style="minimal"] .compatibility-info {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .esim-compatibility-checker {
        padding: 20px;
        margin: 16px 0;
    }
    
    .compatibility-title {
        font-size: 1.5rem;
    }
    
    .device-search {
        flex-direction: column;
    }
    
    .brand-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .brand-item {
        padding: 16px 12px;
    }
    
    .device-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .result-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .esim-compatibility-checker {
        padding: 16px;
    }
    
    .compatibility-title {
        font-size: 1.25rem;
    }
    
    .auto-detect-section {
        padding: 16px;
    }
    
    .btn-auto-detect {
        padding: 10px 24px;
        font-size: 1rem;
    }
    
    .brand-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animation for results */
.compatibility-result {
    animation: slideIn 0.3s ease-out;
}

.device-list {
    animation: fadeIn 0.4s ease-out;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Success/Error States */
.btn-auto-detect.success {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
}

.btn-auto-detect.error {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.device-search-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Tooltip styles */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}