/* WFK Menu Import & Export Modern Style - Grid Layout */

/* Main Container */
.wfp_menu_import_export_container {
    max-width: 1200px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Grid Layout */
.wfk-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* Cards */
.wfp_importexport.card,
.card {
    background: #fff;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    border-radius: 4px;
    padding: 0; /* Padding moved to card-body */
    width: auto;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-header {
    padding: 20px 30px;
    border-bottom: 1px solid #f0f0f1;
    display: flex;
    align-items: center;
    background: #fbfbfb;
    border-radius: 4px 4px 0 0;
}

.card-header .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    margin-right: 15px;
    color: #2271b1;
}

.card h2.title {
    margin: 0;
    font-size: 1.3em;
    color: #1d2327;
    font-weight: 600;
}

.card-body {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.description {
    color: #646970;
    margin: 0 0 25px 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Forms & Inputs */
.wfp-mie-select {
    max-width: 100%;
    width: 100% !important;
    padding: 0 10px;
    min-height: 40px;
    line-height: 2;
    font-size: 14px !important;
    color: #2c3338;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    box-shadow: none;
    margin-bottom: 20px;
    background-color: #fff;
}

.wfp-mie-select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: 2px solid transparent;
}

/* Menu Items List (Export Preview) */
.wfk_menuie_lists {
    margin-top: 0;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 25px;
    flex-grow: 1;
    min-height: 200px;
    position: relative;
}

.wfk-menu-item {
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.wfk-menu-item li {
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    margin-bottom: 0;
}

.wfk-menu-item li:last-child {
    border-bottom: none;
}

.wfk-menu-item li.placeholder-text {
    background: transparent;
    border: none;
    color: #a7aaad;
    text-align: center;
    padding-top: 80px;
    font-style: italic;
}

.wfk-menu-item li a {
    text-decoration: none;
    color: #2c3338;
    font-size: 13px;
}

/* Buttons */
.wfk_menu_export_btn,
.wfk_menu_import_btn {
    width: 100%;
    justify-content: center;
    margin-top: auto; /* Push to bottom */
}

/* Import / Upload Area */
.drop_box {
    border: 2px dashed #c3c4c7;
    border-radius: 4px;
    background: #f6f7f7;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.2s ease;
    margin-bottom: 25px;
    cursor: pointer;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 250px;
}

.drop_box:hover,
.drop_box.dragover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.drop_box .icon-container .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #c3c4c7;
    margin-bottom: 15px;
    transition: color 0.2s;
}

.drop_box:hover .icon-container .dashicons {
    color: #2271b1;
}

.drop_box header h4 {
    margin: 0 0 5px;
    font-size: 16px;
    color: #1d2327;
    font-weight: 600;
}

.drop_box p {
    color: #646970;
    margin: 0 0 15px;
    font-size: 13px;
}

.btn.chooseMenuFile {
    margin-top: 10px;
}

/* Warning/Error Messages */
.warning {
    color: #d63638;
    font-weight: 500;
    margin: 0 0 15px 0;
    font-size: 13px;
}

/* Menu Name Input */
#wfk_mie_menuname {
    width: 100%;
    padding: 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    margin-top: 15px;
    font-size: 14px;
    max-width: 300px;
}

#wfk_mie_menuname:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    .wfk-grid-container {
        grid-template-columns: 1fr;
    }
}
