/**
 * Fastevo Media Protection Admin Styles
 */

/* Custom menu icon */
#adminmenu .toplevel_page_fastevo-mp2 .wp-menu-image {
    background-image: url('../images/menu-icon-alpha.webp');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 20px auto;
}

#adminmenu .toplevel_page_fastevo-mp2 .wp-menu-image:before {
    content: '';
    display: none;
}

/* Settings page styles */
.fastevo-mp2-settings-page {
    max-width: 900px;
    margin-top: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.fastevo-mp2-header {
    margin-bottom: 30px;
}

.fastevo-mp2-header h1 {
    display: flex;
    align-items: center;
    font-size: 23px;
    font-weight: 500;
    margin-bottom: 12px;
}

.fastevo-mp2-header p {
    color: #646970;
    font-size: 14px;
    margin-top: 0;
}

.fastevo-mp2-header img {
    margin-right: 8px;
}

/* Main settings card */
.fastevo-mp2-settings-page .card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid #e2e4e7;
    width: 100%;
    max-width: 900px;
}

.fastevo-mp2-settings-page .form-table {
    margin-top: 0;
}

.fastevo-mp2-settings-page .form-table th {
    width: 250px;
    padding-top: 20px;
    font-weight: 500;
    color: #23282d;
}

.fastevo-mp2-settings-page .form-table td {
    padding-top: 18px;
}

.fastevo-mp2-settings-page input[type="text"],
.fastevo-mp2-settings-page input[type="password"] {
    width: 100%;
    max-width: 450px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 8px 12px;
    box-shadow: 0 0 0 transparent;
    font-size: 14px;
    height: 36px;
}

.fastevo-mp2-settings-page input[type="text"]:focus,
.fastevo-mp2-settings-page input[type="password"]:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.fastevo-mp2-settings-page .description {
    color: #646970;
    font-size: 13px;
    margin-top: 8px;
    line-height: 1.5;
}

/* Submit button */
.fastevo-mp2-settings-page .submit {
    margin-top: 10px;
    padding-bottom: 0;
}

/* Accordion styles */
.fastevo-mp2-accordion {
    margin-top: 25px;
}

.fastevo-mp2-accordion-section {
    margin-bottom: 20px;
    border: 2px solid #e2e4e7;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    background-color: white;
    overflow: hidden;
    transition: all 0.3s ease;
}

.fastevo-mp2-accordion-section:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.15);
}

.fastevo-mp2-accordion h3 {
    cursor: pointer;
    padding: 18px 20px;
    margin: 0;
    background-color: #f0f7fc;
    color: #2271b1;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.fastevo-mp2-accordion h3:after {
    content: "Click to expand";
    position: absolute;
    right: 20px;
    font-size: 12px;
    font-weight: normal;
    color: #646970;
    background-color: #f8f9fa;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    padding: 2px 10px;
}

.fastevo-mp2-accordion h3.ui-state-active:after {
    content: "Click to collapse";
}

.fastevo-mp2-accordion h3:hover {
    background-color: #e6f0f8;
}

.fastevo-mp2-accordion h3:before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 15px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath d='M12,20 L12,4 M4,12 L20,12' stroke='%232271b1' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
    border-radius: 50%;
    background-color: #e6f0f8;
}

.fastevo-mp2-accordion h3.ui-state-active:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath d='M4,12 L20,12' stroke='%232271b1' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
    background-color: #d9ebf7;
}

.fastevo-mp2-accordion .ui-accordion-content {
    padding: 25px;
    border-top: 1px solid #e2e4e7;
    background-color: #fff;
    color: #50575e;
    font-size: 14px;
    line-height: 1.7;
}

/* Table styling */
.fastevo-mp2-accordion table.widefat {
    border: 1px solid #e2e4e7;
    border-collapse: collapse;
    width: 100%;
    margin: 15px 0;
    border-radius: 4px;
    overflow: hidden;
}

.fastevo-mp2-accordion table.widefat th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid #e2e4e7;
    color: #2c3338;
    font-size: 14px;
}

.fastevo-mp2-accordion table.widefat td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: middle;
}

.fastevo-mp2-accordion table.widefat tr:last-child td {
    border-bottom: none;
}

.fastevo-mp2-accordion table.widefat tr:nth-child(even) {
    background-color: #fbfbfc;
}

/* Code and pre styling */
.fastevo-mp2-accordion code {
    background-color: #f0f0f1;
    padding: 3px 5px;
    border-radius: 3px;
    font-size: 13px;
    color: #2271b1;
}

.fastevo-mp2-accordion pre {
    background-color: #f6f7f7;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #2271b1;
    overflow: auto;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.5;
    margin: 15px 0;
}

/* Information and feedback boxes */
.fastevo-mp2-feedback-box {
    background-color: #f6f7f7;
    border-left: 4px solid #2271b1;
    padding: 20px;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
}

.fastevo-mp2-feedback-box h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #2c3338;
    font-size: 15px;
}

.fastevo-mp2-feedback-box ul, 
.fastevo-mp2-feedback-box ol {
    margin-left: 15px;
    color: #50575e;
}

.fastevo-mp2-feedback-box li {
    margin-bottom: 8px;
}

/* Resource links */
.fastevo-mp2-resource-link {
    display: inline-block;
    margin: 5px 0;
    padding: 10px 15px;
    background-color: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    text-decoration: none;
    color: #2271b1;
    font-weight: 500;
    transition: all 0.2s;
}

.fastevo-mp2-resource-link:hover {
    background-color: #f0f0f1;
    border-color: #c3c4c7;
    color: #135e96;
}

.fastevo-mp2-resource-link:before {
    content: "→";
    margin-right: 8px;
    display: inline-block;
}

/* Lists styling */
.fastevo-mp2-accordion ol, 
.fastevo-mp2-accordion ul {
    margin-left: 20px;
    line-height: 1.7;
}

.fastevo-mp2-accordion li {
    margin-bottom: 10px;
}

/* Headings */
.fastevo-mp2-accordion h4 {
    color: #2c3338;
    font-size: 16px;
    margin: 25px 0 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #f0f0f1;
}

.fastevo-mp2-settings-key-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 450px;
    gap: 8px;

    input {
        width: 100%;
        height: 100%;
    }

    button {
        background: none;
        border: 1px solid #a0a0a0;
        cursor: pointer;
        height: 36px;
        padding: 2.5px 8px;
        border-radius: 4px;
        transition: background-color 0.2s, border-color 0.2s;
        display: flex;
        align-items: center;

        &:hover {
            background-color: #f0f0f1;
            border-color: #c3c4c7;
        }

        svg {
            stroke: #444444;
        }
    }
    
    .api-key-field-configured {
        position: relative;
        width: 100%;
        
        input {
            width: 100%;
            padding-right: 100px; /* Space for the badge */
            border: 1px solid #8bc34a;
            background-color: #f7faf5;
            box-shadow: 0 0 0 1px rgba(139, 195, 74, 0.2);
            transition: all 0.2s;
            height: 36px;
            
            &:focus {
                border-color: #8bc34a;
                box-shadow: 0 0 0 1px rgba(139, 195, 74, 0.5);
            }
            
            &::placeholder {
                color: #aaa;
                opacity: 0.7;
            }
        }
        
        .api-key-badge {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            background-color: #8bc34a;
            color: white;
            font-size: 11px;
            font-weight: 600;
            padding: 2px 10px;
            border-radius: 12px;
            letter-spacing: 0.3px;
            text-transform: uppercase;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }
    }
}