/*!
 * Admin Typography Settings CSS
 * Styling for font selector and typography options
 */

/* Font Dropdown Selector */
.ikbase-font-dropdown-wrapper {
    margin: 20px 0;
    max-width: 600px;
}

.ikbase-font-dropdown {
    width: 100%;
    max-width: 300px;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.ikbase-font-dropdown:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.ikbase-font-dropdown option {
    padding: 10px;
    font-size: 16px;
}

.ikbase-font-preview-box {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    border-left: 4px solid #0073aa;
}

.ikbase-font-preview-title {
    margin-bottom: 15px;
    color: #0073aa;
    font-size: 14px;
}

.ikbase-font-preview-text {
    transition: font-family 0.3s ease;
}

.ikbase-font-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.ikbase-font-sample {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.ikbase-font-sample-large {
    font-size: 20px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

/* Font Family Classes for Preview */
.ikbase-font-system {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ikbase-font-inter {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ikbase-font-roboto {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ikbase-font-open-sans {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ikbase-font-lato {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ikbase-font-poppins {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ikbase-font-source-sans {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ikbase-font-nunito {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ikbase-font-montserrat {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ikbase-font-raleway {
    font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ikbase-font-ubuntu {
    font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Responsive Design */
@media (min-width: 768px) {
    .ikbase-font-selector {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .ikbase-font-selector {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Typography Settings Section */
.ikbase-typography-section {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 20px 0;
}

.ikbase-typography-section h3 {
    margin-top: 0;
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

/* Font Loading Indicator */
.ikbase-font-loading {
    opacity: 0.6;
    pointer-events: none;
}

.ikbase-font-loading::after {
    content: "Loading fonts...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Checkbox styling improvements */
.ikbase-typography-section input[type="checkbox"] {
    margin-right: 8px;
}

.ikbase-typography-section label {
    font-weight: 500;
    color: #333;
}

.ikbase-typography-section .description {
    margin-top: 8px;
    font-style: italic;
    color: #666;
}

/* Disabled font dropdown */
.ikbase-font-dropdown.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f5f5f5 !important;
    border-color: #ccc !important;
}

.ikbase-font-dropdown.disabled:focus {
    border-color: #ccc !important;
    box-shadow: none !important;
}

.ikbase-font-dropdown option:disabled {
    color: #999;
    background: #f5f5f5;
}

/* Font loading state improvements */
.ikbase-font-dropdown-wrapper.ikbase-font-loading {
    position: relative;
    opacity: 0.6;
}

.ikbase-font-dropdown-wrapper.ikbase-font-loading .ikbase-font-dropdown,
.ikbase-font-dropdown-wrapper.ikbase-font-loading .ikbase-font-preview-box {
    pointer-events: none;
}

/* Better focus states */
.ikbase-font-option input[type="radio"]:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Animation for selection */
.ikbase-font-option {
    transform: scale(1);
    transition: all 0.3s ease, transform 0.2s ease;
}

.ikbase-font-option.selected {
    transform: scale(1.02);
}

/* Typography preview section */
.ikbase-typography-preview {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.ikbase-typography-preview h4 {
    margin-top: 0;
    color: #0073aa;
}

.ikbase-typography-preview-text {
    font-size: 16px;
    line-height: 1.6;
    margin: 10px 0;
}