/* Local SEO Admin Styles */
.softworld-local-seo-section {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.softworld-local-seo-section h2 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Locations Table */
.softworld-locations-table-container {
    overflow-x: auto;
}

.softworld-locations-table-container table {
    min-width: 800px;
}

.softworld-locations-table-container td {
    vertical-align: top;
    padding: 12px;
}

/* Schema Preview */
.softworld-schema-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
}

/* Shortcode Help */
.softworld-shortcode-help {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #2271b1;
}

.softworld-shortcode-help h4 {
    margin-top: 15px;
    margin-bottom: 8px;
    color: #2271b1;
}

.softworld-shortcode-help h4:first-child {
    margin-top: 0;
}

.softworld-shortcode-help code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    color: #d63384;
}

/* Modal Styles */
#location-modal {
    font-size: 14px;
}

#location-modal .ui-dialog-titlebar {
    text-align: center;
}

/* Modal Tabs */
.softworld-modal-tabs {
    margin-top: 10px;
}

.softworld-tab-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-wrap: wrap;
}

.softworld-tab-nav li {
    margin: 0;
    padding: 0;
}

.softworld-tab-nav li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #555;
    border: 1px solid transparent;
    border-bottom: none;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.softworld-tab-nav li.active a {
    background: #fff;
    border-color: #ddd;
    color: #2271b1;
    font-weight: bold;
}

.softworld-tab-nav li a:hover {
    background: #e6e6e6;
}

.softworld-tab-content {
    display: none;
    padding: 20px 0;
    border: 1px solid #ddd;
    border-top: none;
    background: #fff;
    min-height: 300px;
}

.softworld-tab-content.active {
    display: block;
}

.softworld-tab-content .form-table {
    margin-top: 10px;
}

/* Opening Hours Styles */
.opening-hours-container {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.opening-hours-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.opening-hours-row:last-child {
    margin-bottom: 0;
}

.opening-hours-row .day-name {
    flex: 0 0 120px;
    font-weight: bold;
}

.opening-hours-row .hours-controls {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.opening-hours-row .time-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.opening-hours-row input[type="time"] {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.opening-hours-row input[type="time"]:disabled {
    background: #f5f5f5;
    color: #999;
}

.opening-hours-row .closed-checkbox {
    margin-right: 5px;
}

/* Frontend Styles for Location Display */
.softworld-business-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.softworld-business-info .business-name {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: bold;
}

.softworld-business-info .business-address {
    margin-bottom: 15px;
    color: #6c757d;
}

.softworld-business-info .business-phone,
.softworld-business-info .business-email,
.softworld-business-info .business-website {
    margin-bottom: 10px;
}

.softworld-business-info a {
    color: #2271b1;
    text-decoration: none;
}

.softworld-business-info a:hover {
    text-decoration: underline;
}

/* Opening Hours Tables */
.softworld-opening-hours-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.softworld-opening-hours-table th,
.softworld-opening-hours-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.softworld-opening-hours-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #495057;
}

.softworld-opening-hours-table tr:last-child td {
    border-bottom: none;
}

.softworld-opening-hours-table .day-name {
    font-weight: bold;
    width: 30%;
}

.softworld-opening-hours-table .hours {
    color: #6c757d;
}

.softworld-opening-hours-table .closed {
    color: #dc3545;
    font-style: italic;
}

/* Opening Hours List */
.softworld-opening-hours-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
}

.softworld-opening-hours-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.softworld-opening-hours-list li:last-child {
    border-bottom: none;
}

.softworld-opening-hours-list .closed {
    color: #dc3545;
    font-style: italic;
}

/* Google Maps */
.softworld-google-map {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Locations List */
.softworld-locations-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.softworld-locations-list .location-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.softworld-locations-list .location-item h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.softworld-locations-list .location-address {
    color: #6c757d;
    margin-bottom: 10px;
}

.softworld-locations-list .location-phone {
    margin-bottom: 15px;
}

.softworld-locations-list .location-phone a {
    color: #2271b1;
    text-decoration: none;
    font-weight: bold;
}

.softworld-locations-list .location-phone a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .softworld-tab-nav {
        flex-direction: column;
    }
    
    .opening-hours-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .opening-hours-row .day-name {
        flex: none;
    }
    
    .opening-hours-row .hours-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }
    
    .softworld-locations-list {
        grid-template-columns: 1fr;
    }
}

/* Status Icons */
.softworld-status-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 5px;
}

.softworld-status-icon.active {
    background-color: #28a745;
}

.softworld-status-icon.inactive {
    background-color: #dc3545;
}

.softworld-status-icon.primary {
    background-color: #ffc107;
}

/* Button Styles */
.softworld-btn-group {
    display: flex;
    gap: 5px;
}

.softworld-btn-group .button {
    margin: 0;
}

/* Loading States */
.softworld-loading {
    opacity: 0.6;
    pointer-events: none;
}

.softworld-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: softworld-spin 1s linear infinite;
}

@keyframes softworld-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error and Success Messages */
.softworld-message {
    padding: 12px;
    border-radius: 4px;
    margin: 10px 0;
}

.softworld-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.softworld-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.softworld-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Form Validation */
.softworld-field-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.softworld-error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus States */
.softworld-tab-nav a:focus,
input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .softworld-business-info {
        background: #2c3e50;
        border-color: #495057;
        color: #fff;
    }
    
    .softworld-opening-hours-table {
        background: #343a40;
        color: #fff;
    }
    
    .softworld-opening-hours-table th {
        background: #495057;
    }
    
    .softworld-opening-hours-list {
        background: #343a40;
        color: #fff;
    }
    
    .softworld-locations-list .location-item {
        background: #343a40;
        color: #fff;
        border-color: #495057;
    }
}