/* Unit Converter WordPress Plugin Styles */
/* File: assets/css/unit-converter.css */

.unit-converter-container {
    max-width: 1000px;
    background: #ffffff;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    color: #1e1e1e;
    line-height: 1.6;
}

/* Header Styles */
.converter-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f1;
}

.converter-title {
    color: #1e1e1e;
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    display: block;
    text-align: center;
}

.converter-icon {
    display: block;
    font-size: 48px;
    font-style: normal;
}

h1.converter-title {
	margin-bottom: 0;
}

.converter-description {
    color: #646970;
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

/* Statistics Section */
.converter-stats {
    border-radius: 8px;
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
	background: linear-gradient(135deg, #f8f9fa, #e9ecef);
	border: 1px solid #dee2e6;
	padding: 20px;
	border-radius: 10px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e5e9;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #007cba;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Converter Type Selector */
.converter-type-section {
    margin-bottom: 30px;
}

.converter-type-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1e1e1e;
    font-size: 16px;
}

.converter-type-label i {
    color: #007cba;
    font-size: 18px;
    font-style: normal;
}

.converter-select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #c3c4c7;
    border-radius: 8px;
    background: white;
    font-size: 16px;
    color: #1e1e1e;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.converter-select:hover {
    border-color: #007cba;
}

/* Input Section */
.converter-input-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.input-group {
    position: relative;
    background: #fafafa;
    border: 2px dashed #c3c4c7;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.input-group:hover {
    border-color: #007cba;
    background: #f6f7f7;
}

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

.input-group.active {
    border-color: #007cba;
    background: #f6f7f7;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1e1e1e;
    font-size: 14px;
}

.input-label i {
    color: #007cba;
    font-size: 18px;
    font-style: normal;
}

.input-value {
    width: 100%;
    font-size: 24px;
    font-weight: 700;
    color: #1e1e1e;
    text-align: center;
    margin-bottom: 15px;
    background-color: white !important;
    border: 2px solid #333 !important;
    border-radius: 8px !important;
    outline: none;
    padding: 15px 10px;
    transition: all 0.3s ease;
}

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

.input-value:hover {
    border-color: #007cba;
}

.input-value::placeholder {
    color: #8c8f94;
    font-weight: 400;
}

.unit-selector select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    color: #1e1e1e;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.unit-selector select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.unit-selector select:hover {
    border-color: #007cba;
}

/* Formula Section */
.formula-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #e1e5e9;
}

.formula-title {
    color: #1e1e1e;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.formula-title i {
    color: #007cba;
    font-size: 20px;
    font-style: normal;
}

.formula-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 15px 20px;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.formula-text {
    font-size: 14px;
    color: #1e1e1e;
    font-weight: 500;
    flex: 1;
    margin-right: 15px;
}

.copy-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

/* Info Section */
.info-section {
    margin-top: 30px;
}

.info-details {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
}

.info-summary {
    background: #f8f9fa;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #1e1e1e;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s ease;
    border: none;
    width: 100%;
    text-align: left;
    list-style: none;
}

.info-summary:hover {
    background: #f0f0f1;
}

.info-summary i {
    color: #007cba;
    font-size: 18px;
    font-style: normal;
}

.info-summary::-webkit-details-marker {
    display: none;
}

.info-content {
    padding: 20px;
    background: white;
}

.info-content p {
    color: #1e1e1e;
    line-height: 1.6;
    margin-bottom: 15px;
	font-size: 16px;
}

.info-content .example {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    border: 1px solid #e1e5e9;
}

.info-content .example strong {
    color: #007cba;
}

/* SEO Content */
.seo-content {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.seo-content h2 {
    color: #1e1e1e;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.seo-content h2 i {
    color: #007cba;
    font-size: 26px;
    font-style: normal;
}

.seo-content h3 {
    color: #1e1e1e;
    font-size: 20px;
    margin: 25px 0 15px 0;
    font-weight: 600;
}

.seo-content p {
    color: #646970;
    line-height: 1.7;
    margin-bottom: 15px;
	font-size: 16px;
}

.seo-content ul, .seo-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.seo-content li {
    color: #646970;
    margin-bottom: 8px;
    line-height: 1.6;
	font-size: 16px;
}

.seo-content strong {
    color: #1e1e1e;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.feature-card {
    text-align: center;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: white;
}

.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
    font-size: 24px;
    color: #007cba;
    font-style: normal;
}

.feature-card h4 {
    color: #1e1e1e;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-card p {
    color: #646970;
    font-size: 14px;
    line-height: 1.5;
}

/* Specialized Converters */
.cm-to-inches-converter .converter-icon {
    color: #007cba;
}

.lbs-to-kg-converter .converter-icon {
    color: #00a32a;
}

.cm-to-inches-converter .converter-title {
    color: #007cba;
}

.lbs-to-kg-converter .converter-title {
    color: #00a32a;
}

.cm-to-inches-converter .formula-title i,
.cm-to-inches-converter .input-label i {
    color: #007cba;
}

.lbs-to-kg-converter .formula-title i,
.lbs-to-kg-converter .input-label i {
    color: #00a32a;
}

.cm-to-inches-converter .input-group:hover,
.cm-to-inches-converter .input-group:focus-within,
.cm-to-inches-converter .input-group.active {
    border-color: #007cba;
}

.lbs-to-kg-converter .input-group:hover,
.lbs-to-kg-converter .input-group:focus-within,
.lbs-to-kg-converter .input-group.active {
    border-color: #00a32a;
}

.cm-to-inches-converter .input-value:focus,
.cm-to-inches-converter .input-value:hover {
    border-color: #007cba;
}

.lbs-to-kg-converter .input-value:focus,
.lbs-to-kg-converter .input-value:hover {
    border-color: #00a32a;
}

.cm-to-inches-converter .copy-btn {
    background: #007cba;
}

.cm-to-inches-converter .copy-btn:hover {
    background: #005a87;
}

.lbs-to-kg-converter .copy-btn {
    background: #00a32a;
}

.lbs-to-kg-converter .copy-btn:hover {
    background: #007d1f;
}

/* Formula explanation styling */
.formula-explanation {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #e1e5e9;
}

.formula-explanation p {
    margin-bottom: 10px;
}

.formula-explanation p:last-child {
    margin-bottom: 0;
}

/* Conversion table styling */
.conversion-table {
    margin: 20px 0;
}

.conversion-table li {
    margin-bottom: 8px;
    padding: 5px 0;
}

.conversion-table li strong {
    color: #1e1e1e;
    font-weight: 700;
}
.unit-converter-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.unit-converter-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid #007cba;
    animation: spin 1s linear infinite;
}

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

/* Error State */
.input-group.error {
    border-color: #d63638;
    background: #ffe6e6;
}

.input-value.error {
    border-color: #d63638;
    color: #d63638;
}

/* Success State */
.copy-btn.success {
    background: #00a32a;
}

/* Widget Specific Styles */
.widget .unit-converter-container {
    margin: 0;
    padding: 15px;
    box-shadow: none;
    border: 1px solid #e1e5e9;
}

.widget .converter-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.widget .converter-title {
    font-size: 20px;
}

.widget .converter-icon {
    font-size: 32px;
}

.widget .converter-description {
    font-size: 14px;
}

.widget .converter-input-section {
    gap: 15px;
}

.widget .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.widget .stat-number {
    font-size: 18px;
}

.widget .stat-label {
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .converter-input-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .converter-title {
        font-size: 24px;
    }
    
    .formula-content {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .formula-text {
        margin-right: 0;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .converter-title {
        font-size: 22px;
    }
    
    .converter-icon {
        font-size: 40px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .copy-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .unit-converter-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .copy-btn {
        display: none;
    }
    
    .info-details[open] .info-content {
        display: block !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .unit-converter-container {
        border: 2px solid #000;
    }
    
    .input-group {
        border-color: #000;
    }
    
    .copy-btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}