/* My Account Widget - My Shortcuts Table Styles */

/* Theme Override - Force Full Width */
.woocommerce-account .woocommerce {
    max-width: none !important;
}

.woocommerce-account .woocommerce-MyAccount-content {
    max-width: none !important;
}

/* Target specific bsMyAccount element */
.bsMyAccount.bsMyAccount--dashboard-inner {
    width: 100% !important;
    max-width: none !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important;
}

/* Target parent containers */
.bsMyAccount.bsMyAccount--dashboard-inner .woocommerce-MyAccount-content,
.bsMyAccount.bsMyAccount--dashboard-inner .shortcuts-content,
.bsMyAccount.bsMyAccount--dashboard-inner .shortcuts-table-container,
.bsMyAccount.bsMyAccount--dashboard-inner .shortcuts-table {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important;
}

/* Fix for all container elements */
.woocommerce-MyAccount-content-wrapper,
.woocommerce-account .woocommerce-MyAccount-content-wrapper,
.bsMyAccount .woocommerce-MyAccount-content-wrapper,
.bsMyAccount.bsMyAccount--dashboard-inner .woocommerce-MyAccount-content-wrapper,
.woocommerce-MyAccount-content-wrapper.shortcuts-content,
.shortcuts-content,
.shortcuts-table-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    display: block !important;
    float: none !important;
}

.woocommerce-account .entry-content,
.woocommerce-account .site-content,
.woocommerce-account .content-area,
.woocommerce-account .page-content,
.woocommerce-account article,
.woocommerce-account .container,
.woocommerce-account .elementor-container {
    max-width: none !important;
    width: 100% !important;
    padding-right: 0 !important;
    overflow: visible !important;
}

/* WooCommerce My Account Layout Fixes */
.woocommerce-account .woocommerce {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
}

.woocommerce-account .woocommerce-MyAccount-navigation {
    float: left;
    width: 18%;
    margin-right: 2%;
    box-sizing: border-box;
}

.woocommerce-account .woocommerce-MyAccount-content {
    float: left;
    width: 80% !important;
    box-sizing: border-box;
    padding-right: 0 !important;
    max-width: 80% !important;
}

.woocommerce-MyAccount-content-wrapper.shortcuts-content {
    width: 100% !important;
    box-sizing: border-box;
    max-width: 100% !important;
    overflow: visible !important;
}

/* Page Title */
.shortcuts-page-title {
    color: #909CFE;
    font-size: 24px;
    margin-bottom: 20px !important;
}

/* Table Container */
.shortcuts-table-container {
    margin-top: 20px;
    overflow-x: visible !important;
    position: relative;
    width: 100% !important;
    box-sizing: border-box;
    max-width: 100% !important;
}

/* Table Styles */
.shortcuts-table,
.woocommerce-MyAccount-content .shortcuts-table,
.shortcuts-content .shortcuts-table,
.shortcuts-table-container .shortcuts-table {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0 4px;
    margin-top: -4px;
    table-layout: auto;
    word-break: normal;
    max-width: none !important;
    min-width: 0 !important;
    display: table !important;
}

.shortcuts-table td {
    white-space: nowrap;
    padding: 12px 15px;
    vertical-align: middle;
    font-size: 15px;
}

/* Column Widths */
.shortcuts-table .shortcut-name-column {
    width: 40%;
    min-width: 200px;
}

.shortcuts-table .shortcut-version-column {
    width: 15%;
    text-align: center;
    min-width: 80px;
}

.shortcuts-table .shortcut-date-column {
    width: 20%;
    text-align: center;
    min-width: 100px;
}

.shortcuts-table .shortcut-actions-column {
    width: 25%;
    text-align: center;
    min-width: 120px;
}

/* Cell Alignments */
.shortcuts-table td.shortcut-version-cell {
    text-align: center;
    vertical-align: middle;
}

.shortcuts-table td.shortcut-date-cell {
    text-align: center;
    vertical-align: middle;
}

.shortcuts-table td.shortcut-actions-cell {
    text-align: center;
    vertical-align: middle;
}

/* Shortcut Name Container */
.shortcut-name-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #373737;
    padding: 8px 12px;
    border-radius: 4px;
    margin-right: 15px;
}

.shortcut-name-text {
    font-weight: 600;
    color: #CACACA;
    font-size: 15px;
}

.shortcut-name-text a {
    color: #CACACA;
    text-decoration: none;
}

.shortcut-name-text a:hover {
    color: #909CFE;
}

/* Action Button */
.shortcut-action-button {
    background: none;
    border: none;
    color: #909CFE;
    cursor: pointer;
    padding: 8px;
    margin-left: 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    display: inline-block;
}

.shortcut-action-button:hover {
    background-color: #252525;
}

.shortcut-action-button i {
    font-size: 16px;
}

/* Table Header */
.shortcuts-table thead th {
    color: #909CFE;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 15px;
    text-align: left;
}

.shortcuts-table thead th.shortcut-version-column,
.shortcuts-table thead th.shortcut-date-column,
.shortcuts-table thead th.shortcut-actions-column {
    text-align: center;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .shortcuts-table {
        min-width: 100%;
    }
    
    .shortcuts-table thead {
        display: none;
    }
    
    .shortcuts-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #373737;
    }
    
    .shortcuts-table tbody td {
        display: block;
        text-align: right;
        padding: 10px;
        position: relative;
        border-bottom: 1px solid #373737;
    }
    
    .shortcuts-table tbody td:last-child {
        border-bottom: none;
    }
    
    .shortcuts-table tbody td:before {
        content: attr(data-title);
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 600;
        color: #909CFE;
    }
    
    .shortcut-name-container {
        margin-right: 0;
        justify-content: flex-end;
    }
    
    .shortcuts-table td.shortcut-version-cell,
    .shortcuts-table td.shortcut-date-cell,
    .shortcuts-table td.shortcut-actions-cell {
        text-align: right;
    }
}
