/* CSV Digital Menu - Public Styles v7.7 (FINAL - Button and Menu Styles Corrected) */

.cdm-menu-category-wrap {
    width: 100%;
    box-sizing: border-box;
}

/* --- Styles for Category Title --- */
.cdm-menu-category-title {
    font-size: 2.5em;
    text-align: center;
    text-transform: uppercase;
    margin: 0 auto 20px auto;
    color: inherit;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- Styles for Back Button --- */
.cdm-button-wrap {
    text-align: center; /* This will center the button */
    margin-bottom: 30px;
}

.cdm-back-button {
    display: inline-block;
    padding: 8px 25px;
    border: 1px solid #ffffff;
    border-radius: 50px; /* Pill shape */
    color: #ffffff;
    background-color: transparent;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cdm-back-button:hover {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

/* --- Menu List and Item Styles --- */
.cdm-menu-list {
    list-style: none !important; 
    padding: 0 !important;
    margin: 0 !important;
    width: 100%; 
}

.elementor-widget-shortcode .cdm-menu-item { /* Use high specificity for the item itself */
    padding: 10px 0 !important; 
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.elementor-widget-shortcode .cdm-menu-item:last-child {
    border-bottom: none !important;
}

/* Use high specificity for the inner elements to override theme */
.elementor-widget-shortcode .cdm-item-title-line { 
    display: flex !important;       
    flex-direction: row !important; /* Force horizontal for all screen sizes */
    align-items: baseline !important;
    width: 100% !important;
    line-height: 1.4;
    margin-bottom: 4px; 
}

.elementor-widget-shortcode .cdm-item-name {
    flex-shrink: 1; 
    margin-right: 0.5em;
    font-weight: 600; 
}

.elementor-widget-shortcode .cdm-item-dots {
    flex-grow: 1 !important; 
    border-bottom: 1px dotted currentColor;
    margin-bottom: 0.4em; 
}

.elementor-widget-shortcode .cdm-item-price {
    flex-shrink: 0; 
    white-space: nowrap;
    margin-left: 0.5em;
    font-weight: 600; 
}

.elementor-widget-shortcode .cdm-item-description {
    opacity: 0.8;
    line-height: 1.5;
    width: 100%; 
    font-size: 0.9em;
}

/* --- Read More & Popup Styles --- */
.cdm-read-more { /* Keep this selector simple */
    display: inline-block; margin-left: 8px; font-weight: bold; text-decoration: none; cursor: pointer;
    width: 24px; height: 24px; line-height: 22px; text-align: center;
    border: 1px solid #888; border-radius: 50%;
    font-size: 14px; color: #888; background-color: transparent;
    transition: all 0.2s ease-in-out; position: relative; top: 4px;
}
.cdm-read-more:hover { background-color: #888; color: #1a1a1a; }

#cdm-popup-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); z-index: 100000; display: none; justify-content: center; align-items: center; padding: 20px; box-sizing: border-box; }
#cdm-popup-content { position: relative; background-color: #1a1a1a; color: #f0f0f0; padding: 30px 40px; border: 1px solid #444; border-radius: 8px; max-width: 600px; width: 100%; max-height: 80vh; overflow-y: auto; box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5); text-align: left; }
#cdm-popup-title { margin-top: 0; margin-bottom: 15px; font-size: 1.6em; line-height: 1.3; color: #ffffff; border-bottom: 1px solid #555; padding-bottom: 10px; }
#cdm-popup-description { font-size: 1em; line-height: 1.7; color: #cccccc; }
#cdm-popup-close { position: absolute; top: 10px; right: 15px; font-size: 30px; font-weight: bold; color: #aaaaaa; cursor: pointer; line-height: 1; transition: color 0.2s; }
#cdm-popup-close:hover { color: #ffffff; }

/* The @media query for mobile is removed, so desktop styles apply everywhere.
   Mobile-specific FONT SIZES are handled by the inline styles from the plugin's admin settings. */