/* World Power Plug Search - Main Styles */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600;700&display=swap');

/* Container */
.pps-container {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 40px;
    background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
    box-sizing: border-box;
    transition: padding 0.3s ease;
}

.pps-container.has-result {
    padding-bottom: 60px;
}

.pps-container * {
    box-sizing: border-box;
}

/* Header */
.pps-header {
    text-align: center;
    margin-bottom: 24px;
}

.pps-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.pps-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.pps-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.pps-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    font-weight: 400;
}

/* Search Wrapper */
.pps-search-wrapper {
    max-width: 560px;
    margin: 0 auto 20px;
}

/* Dropdown */
.pps-dropdown {
    position: relative;
    width: 100%;
}

.pps-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pps-dropdown-trigger:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pps-dropdown.active .pps-dropdown-trigger {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.pps-placeholder {
    font-size: 15px;
    color: #94a3b8;
    font-weight: 400;
}

.pps-selected-country {
    font-size: 15px;
    color: #1e293b;
    font-weight: 500;
}

.pps-search-icon {
    width: 20px;
    height: 20px;
    color: #94a3b8;
    flex-shrink: 0;
}

/* Dropdown Menu */
.pps-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.pps-dropdown.active .pps-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pps-search-input-wrapper {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.pps-search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
    color: #1e293b;
}

.pps-search-input::placeholder {
    color: #94a3b8;
}

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

/* Country List */
.pps-country-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px 0;
}

.pps-country-list::-webkit-scrollbar {
    width: 8px;
}

.pps-country-list::-webkit-scrollbar-track {
    background: #f8fafc;
}

.pps-country-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.pps-country-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.pps-country-item {
    padding: 12px 20px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pps-country-item:hover {
    background: #f8fafc;
    color: #1e293b;
}

.pps-country-item.hidden {
    display: none;
}

/* Result Section */
.pps-result {
    max-width: 560px;
    margin: 0 auto;
}

.pps-initial-message {
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    padding: 16px 20px;
}

/* Result Content */
.pps-result-content {
    animation: fadeIn 0.3s ease;
}

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

.pps-country-name {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 24px;
}

/* Info Cards */
.pps-info-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.pps-info-card {
    padding: 20px 16px;
    border-radius: 12px;
    text-align: center;
}

.pps-info-card.voltage {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.pps-info-card.frequency {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.pps-info-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pps-info-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

/* Plug Notation Section */
.pps-plug-notation {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.pps-notation-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
}

.pps-notation-label {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 6px;
    font-weight: 500;
}

.pps-notation-value {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    letter-spacing: 0.05em;
}

/* Plug Types Section */
.pps-plug-section {
    margin-bottom: 24px;
}

.pps-plug-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pps-plug-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.pps-plug-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.2s ease;
}

.pps-plug-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.pps-plug-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pps-plug-icon svg {
    width: 100%;
    height: 100%;
}

.pps-plug-type {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.pps-plug-name {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

/* Notes Section */
.pps-notes {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 24px;
}

.pps-notes-title {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pps-notes-title svg {
    width: 16px;
    height: 16px;
}

.pps-notes-text {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

/* Loading State */
.pps-loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.pps-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 640px) {
    .pps-container {
        padding: 40px 16px 60px;
    }
    
    .pps-title {
        font-size: 22px;
    }
    
    .pps-subtitle {
        font-size: 14px;
    }
    
    .pps-icon {
        width: 60px;
        height: 60px;
    }
    
    .pps-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .pps-info-cards {
        grid-template-columns: 1fr;
    }
    
    .pps-info-value {
        font-size: 24px;
    }
    
    .pps-plug-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pps-country-name {
        font-size: 18px;
    }
}
