/**
 * Admin styles for Localized Shipping Messages for WooCommerce
 */

/* Layout Structure */
.lsm-admin-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.lsm-admin-main {
    flex: 1;
    min-width: 0;
}

.lsm-admin-sidebar {
    width: 300px;
    flex-shrink: 0;
}

@media (max-width: 1200px) {
    .lsm-admin-container {
        flex-direction: column;
    }
    
    .lsm-admin-sidebar {
        width: 100%;
    }
}

/* Card Styling */
.lsm-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    padding: 20px;
    margin-bottom: 20px;
}

.lsm-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    font-size: 1.3em;
    font-weight: 600;
}

.lsm-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: 600;
}

/* Form Styling */
#lsm-message-form {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.lsm-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.lsm-form-group {
    display: flex;
    flex-direction: column;
}

.lsm-form-group-full {
    grid-column: 1 / -1;
}

.lsm-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e1e1e;
}

.lsm-select,
.lsm-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
}

.lsm-select:focus,
.lsm-textarea:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: 2px solid transparent;
}

.lsm-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Toggle Switch */
.lsm-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.lsm-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.lsm-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.lsm-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.lsm-toggle input:checked + .lsm-toggle-slider {
    background-color: #2271b1;
}

.lsm-toggle input:checked + .lsm-toggle-slider:before {
    transform: translateX(26px);
}

/* Button Styling */
#lsm-add-message {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

#lsm-add-message .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin: 0;
}

.lsm-delete-message {
    color: #b32d2e;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.lsm-delete-message:hover {
    color: #a02222;
    border-color: #a02222;
    background: #f6f7f7;
}

.lsm-delete-message .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin: 0;
}

/* Table Styling */
.lsm-messages-table {
    margin-top: 30px;
}

.lsm-messages-table h3 {
    margin-bottom: 15px;
}

.wp-list-table .column-country {
    width: 20%;
}

.wp-list-table .column-state {
    width: 20%;
}

.wp-list-table .column-message {
    width: 45%;
}

.wp-list-table .column-actions {
    width: 15%;
    text-align: right;
}

/* Empty State */
.lsm-empty-state {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 4px;
}

.lsm-empty-state .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #8c8f94;
    margin-bottom: 10px;
}

.lsm-empty-state p {
    margin: 5px 0;
    color: #50575e;
}

.lsm-empty-state .description {
    color: #8c8f94;
}

/* Sidebar */
.lsm-tips {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lsm-tips li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
}

.lsm-tips li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #00a32a;
    font-weight: bold;
}

/* Variables List */
.lsm-variables-list {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.lsm-variables-list dt {
    font-weight: 600;
    margin-bottom: 4px;
}

.lsm-variables-list dd {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 13px;
}

.lsm-variables-list dt:last-of-type + dd {
    margin-bottom: 0;
}

.lsm-variables-list code {
    background: #fff;
    padding: 2px 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
}

.lsm-example {
    margin-top: 15px;
    padding: 12px;
    background: #f0f8ff;
    border: 1px solid #d1e4f3;
    border-radius: 4px;
}

.lsm-example code {
    display: block;
    margin-top: 5px;
    background: #fff;
    padding: 8px;
    border: 1px solid #d1e4f3;
    border-radius: 3px;
    font-size: 12px;
    word-wrap: break-word;
}

/* Notices */
.lsm-admin-notice {
    margin: 10px 0;
}

.lsm-admin-notice.success {
    border-left-color: #00a32a;
}

.lsm-admin-notice.error {
    border-left-color: #d63638;
}

/* Disabled State */
#lsm_state[disabled] {
    background-color: #f0f0f1;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 782px) {
    .lsm-form-grid {
        grid-template-columns: 1fr;
    }
    
    .wp-list-table {
        display: block;
        overflow-x: auto;
    }
    
    .column-actions {
        text-align: left !important;
    }
}

/**
 * Public styles for Localized Shipping Messages for WooCommerce
 */

.lsm-shipping-message td {
    padding: 10px 0;
}

.lsm-message-container {
    background-color: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lsm-message-icon {
    font-size: 18px;
    line-height: 1;
}

.lsm-message-text {
    flex: 1;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

.lsm-method-message {
    margin-top: 5px;
    padding-left: 25px;
}

.lsm-method-message small {
    color: #666;
    font-style: italic;
    display: block;
    line-height: 1.3;
}

/* Order pages styling */
.lsm-order-shipping-message {
    margin: 20px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.lsm-order-shipping-message h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.lsm-order-shipping-message .lsm-message-container {
    background-color: #fff;
    border-color: #ddd;
}

/* WooCommerce My Account styling */
.woocommerce-MyAccount-content .lsm-order-shipping-message {
    margin-top: 30px;
}

/* Thank you page styling */
.woocommerce-thankyou .lsm-order-shipping-message {
    margin-bottom: 30px;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .lsm-message-container {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .lsm-message-icon {
        font-size: 16px;
    }
    
    .lsm-order-shipping-message {
        padding: 15px;
    }
    
    .lsm-order-shipping-message h3 {
        font-size: 16px;
    }
}

ul#shipping_method .lsm-method-message small{
	display:none;
}