/**
 * Waply Standard Button CSS
 */

/* Make the wrap container full width */
.wrap {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-right: 20px !important;
}

/* Make the settings content full width */
.waply-settings-content {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-right: 20px !important; /* Add padding to prevent content from being cut off */
    overflow-x: hidden !important; /* Prevent horizontal scrolling */
}

/* Make the settings sections full width */
.waply-settings-section {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Make the style options container full width */
.waply-style-options {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Standard Button Grid */
.waply-ultra-direct-buttons.waply-grid-layout {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 20px !important;
    margin: 20px 0 !important;
    width: 100% !important;
    padding-right: 20px !important; /* Add padding to prevent buttons from being cut off */
    box-sizing: border-box !important;
}

.waply-ultra-button-option {
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    padding: 15px !important;
    background-color: #fff !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
    position: relative !important;
    margin-bottom: 0 !important;
    float: none !important;
    width: auto !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent content from overflowing */
    min-height: 200px !important; /* Make boxes taller to fit selected indicator */
    display: flex !important;
    flex-direction: column !important;
}

.waply-ultra-button-option:hover {
    border-color: #2271b1 !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
    transform: translateY(-2px) !important;
}

.waply-ultra-button-option.selected {
    border-color: #2271b1 !important;
    background-color: #f0f7fc !important;
}

.waply-ultra-button-preview {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important; /* Increase gap between elements */
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    flex: 1 !important; /* Take up remaining space */
    padding: 15px 0 !important; /* Add padding at top and bottom */
}

.waply-ultra-button-img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    width: auto !important;
    max-height: 60px !important; /* Control the height of the button images */
    min-height: 50px !important; /* Ensure consistent height */
}

.waply-ultra-save-button {
    margin-top: 10px !important;
    font-size: 13px !important;
    padding: 5px 12px !important;
    height: auto !important;
    line-height: 1.5 !important;
    width: 100% !important; /* Make the button full width */
    box-sizing: border-box !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Selected Header */
.waply-selected-header {
    background-color: #2271b1 !important;
    color: white !important;
    padding: 10px !important;
    margin: -15px -15px 15px -15px !important; /* Extend to edges of container */
    text-align: center !important;
    font-weight: bold !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    line-height: 1.5 !important;
    position: relative !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Selected Tick */
.waply-selected-tick {
    position: relative !important;
    margin-left: 8px !important;
    width: 20px !important;
    height: 20px !important;
    background-color: white !important;
    color: #2271b1 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 12px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
}

.waply-selected-tick:before {
    content: "✓" !important;
}

/* Position Preview */
.waply-position-preview {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.waply-preview-screen {
    position: relative !important;
    width: 100% !important;
    height: 500px !important;
    border: 1px solid #ddd !important;
    background-color: #f9f9f9 !important;
    margin-top: 15px !important;
    overflow: visible !important;
    padding: 100px !important;
    box-sizing: border-box !important;
}

/* Responsive Styles */
@media (max-width: 782px) {
    .waply-ultra-direct-buttons.waply-grid-layout {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        padding-right: 15px !important;
    }

    .waply-ultra-button-option {
        padding: 10px !important;
    }

    .waply-ultra-button-img {
        max-height: 50px !important;
    }

    .waply-ultra-save-button {
        font-size: 12px !important;
        padding: 4px 8px !important;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .waply-ultra-direct-buttons.waply-grid-layout {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
        gap: 10px !important;
    }
}
