/* Compressed Air Converter Widget Styles */
h2.converter-title {
    color: #fff;
}
.compressed-air-converter-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.compressed-air-converter-shortcode {
    margin: 20px 0;
}

/* Converter Header */
.converter-header {
    margin-bottom: 32px;
}

.converter-title {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    letter-spacing: -0.025em;
}

.converter-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* Conversion Grid */
.conversion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.conversion-column {
    display: flex;
    flex-direction: column;
}

.unit-label {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #475569;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
    transition: all 0.2s ease;
}

.unit-input {
    width: 100%;
    padding: 16px 45px 16px 16px;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    color: #0f172a;
    transition: all 0.2s ease;
    box-sizing: border-box;
    -moz-appearance: textfield;
}

.unit-input::-webkit-outer-spin-button,
.unit-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.unit-input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.unit-input::placeholder {
    color: #94a3b8;
}

.input-wrapper:has(.unit-input:focus) {
    transform: translateY(-1px);
}

.copy-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background-color: #f1f5f9;
}

.copy-icon, .check-icon {
    font-size: 14px;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.copy-btn:hover .copy-icon {
    color: #475569;
}

.check-icon {
    color: #059669 !important;
}

.unit-description {
    font-size: 12px;
    color: #64748b;
    margin: 8px 0 0 0;
}

/* Conversion Info */
.conversion-info {
    background: white;
    border-left: 4px solid #f59e0b;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    display: none;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-item {
    text-align: center;
}

.info-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin: 0 0 4px 0;
}

.info-value {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    margin: 0;
}

/* Reset Button */
.reset-btn {
    width: 100%;
    padding: 12px 24px;
    background-color: #e2e8f0;
    color: #1e293b;
    border: none;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
    display: none;
}

.reset-btn:hover {
    background-color: #cbd5e1;
    transform: translateY(-1px);
}

.reset-btn:active {
    transform: translateY(0);
}

/* Product Specification Selector */
.product-spec-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.spec-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.spec-label {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.spec-dropdown {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.spec-dropdown-toggle {
    width: 100%;
    padding: 10px 16px;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.spec-dropdown-toggle:hover {
    border-color: #94a3b8;
}

.spec-dropdown-toggle:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.spec-selected {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 10px;
    color: #64748b;
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.spec-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.spec-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    margin-top: 4px;
    padding: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.spec-dropdown.active .spec-dropdown-menu {
    display: block;
}

.spec-option {
    padding: 10px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spec-option:hover {
    background-color: #f1f5f9;
}

.spec-option.active {
    background-color: #fef3c7;
}

.spec-option-name {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.spec-option-hint {
    font-size: 10px;
    color: #64748b;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.spec-option:hover .spec-option-hint {
    opacity: 1;
}

.spec-apply-btn {
    padding: 10px 20px;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.spec-apply-btn:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.spec-apply-btn:active {
    transform: translateY(0);
}

.spec-hint {
    font-size: 11px;
    color: #64748b;
    margin: 8px 0 0 0;
    font-style: italic;
}

/* Instructions */
.instructions {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    margin: 16px 0 0 0;
    transition: all 0.3s ease;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .compressed-air-converter-widget {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-color: #334155;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    }
    
    .converter-title {
        color: #f8fafc;
    }
    
    .converter-subtitle,
    .unit-description,
    .instructions {
        color: #94a3b8;
    }
    
    .unit-label {
        color: #cbd5e1;
    }
    
    .unit-input {
        background: #334155;
        border-color: #475569;
        color: #f1f5f9;
    }
    
    .unit-input:focus {
        border-color: #f59e0b;
        box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
    }
    
    .unit-input::placeholder {
        color: #64748b;
    }
    
    .copy-btn:hover {
        background-color: #475569;
    }
    
    .copy-icon {
        color: #94a3b8;
    }
    
    .conversion-info {
        background: #334155;
        border-left-color: #f59e0b;
    }
    
    .info-label {
        color: #94a3b8;
    }
    
    .info-value {
        color: #fbbf24;
    }
    
    .reset-btn {
        background-color: #475569;
        color: #f1f5f9;
    }
    
    .reset-btn:hover {
        background-color: #64748b;
    }
    
    .product-spec-section {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-color: #475569;
    }
    
    .spec-label {
        color: #cbd5e1;
    }
    
    .spec-dropdown-toggle {
        background: #334155;
        border-color: #475569;
        color: #f1f5f9;
    }
    
    .spec-dropdown-toggle:hover {
        border-color: #64748b;
    }
    
    .spec-dropdown-toggle:focus {
        border-color: #f59e0b;
        box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
    }
    
    .dropdown-arrow {
        color: #94a3b8;
    }
    
    .spec-dropdown-menu {
        background: #334155;
        border-color: #475569;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    }
    
    .spec-option {
        color: #f1f5f9;
    }
    
    .spec-option:hover {
        background-color: #475569;
    }
    
    .spec-option.active {
        background-color: #92400e;
    }
    
    .spec-option-name {
        color: #f1f5f9;
    }
    
    .spec-option-hint {
        color: #94a3b8;
    }
    
    .spec-apply-btn {
        background: #f59e0b;
        color: #0f172a;
    }
    
    .spec-apply-btn:hover {
        background: #d97706;
    }
    
    .spec-hint {
        color: #94a3b8;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .compressed-air-converter-widget {
        padding: 16px;
    }
    
    .conversion-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .converter-title {
        font-size: 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .spec-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .spec-label {
        text-align: center;
        margin-bottom: 8px;
    }
    
    .spec-dropdown {
        min-width: 0;
        margin-bottom: 8px;
    }
    
    .spec-apply-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .compressed-air-converter-widget {
        padding: 12px;
    }
    
    .unit-input {
        font-size: 16px;
        padding: 14px 40px 14px 14px;
    }
}

/* URL Info Section */
.url-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border: 2px solid #0ea5e9;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    display: none;
}

.url-text {
    font-size: 13px;
    color: #0369a1;
    margin: 0 0 12px 0;
    word-break: break-all;
}

.url-copy-btn {
    padding: 8px 16px;
    background: #0ea5e9;
    color: white;
    border: none;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.url-copy-btn:hover {
    background: #0284c7;
    transform: translateY(-1px);
}

.url-copy-btn:active {
    transform: translateY(0);
}

/* Dark mode for URL info */
@media (prefers-color-scheme: dark) {
    .url-info {
        background: linear-gradient(135deg, #0c4a6e 0%, #075985 100%);
        border-color: #0284c7;
    }
    
    .url-text {
        color: #bae6fd;
    }
    
    .url-copy-btn {
        background: #0284c7;
    }
    
    .url-copy-btn:hover {
        background: #0369a1;
    }
}