/* *** General styles *** */
/* Error message */
.gewerbesteuer-error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 15px 0;
    display: block;
}

/* Medium icon size */
.gewerbesteuer-icon-medium {
    font-size: 18px;
}

/* Big icon size */
.gewerbesteuer-icon-big {
    font-size: 20px;
}

/* Small icon size */
.gewerbesteuer-icon-small {
    font-size: 14px;
}

/* Text align left */
.gewerbesteuer-align-left {
    text-align: left !important;
}

/* Text align right */
.gewerbesteuer-align-right {
    text-align: right !important;
}

/* *** Advertising page *** */
/* H2 for advertisements */
.gewerbesteuer-ads-h2 {
    padding-top: 0; 
    margin-top: 0; 
    margin-bottom: 0 !important;
}

/* Text paragraph for advertisements */
.gewerbesteuer-ads-paragraph {
    margin-top: 15px;
}

/* *** Search Page *** */
/* Search results wrapper */
.gewerbesteuer-search-wrapper {
    max-width: 100%;
}

/* Search form container */
.gewerbesteuer-search-form {
    display: flex;
    gap: 15px;
    align-items: stretch;
    margin-bottom: 30px;
    flex-wrap: nowrap;
    max-width: 600px;
}

@media (max-width: 600px) {
    .gewerbesteuer-search-form {
        flex-wrap: wrap;
    }
}

/* Search input field div */
.gewerbesteuer-input-div {
    flex: 1;
    min-width: 200px;
}

.gewerbesteuer-input-div input {
    width: 100% !important;
    padding: 14px 18px !important;
    font-size: 16px !important;
    height: auto !important;
    line-height: 1.5 !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    background: #fff !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box !important;
}

.gewerbesteuer-input-div input:focus {
    border-color: #1a5276 !important;
    box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.1) !important;
    outline: none !important;
}

/* Search button div */
.gewerbesteuer-search-button-div {
    flex-shrink: 0;
}

.gewerbesteuer-search-button-div a,
.gewerbesteuer-search-button-div button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 14px 28px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, #1a5276, #154360) !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    height: 100%;
    min-height: 50px;
}

.gewerbesteuer-search-button-div a:hover,
.gewerbesteuer-search-button-div button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(26, 82, 118, 0.3) !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* Search results heading */
.gewerbesteuer-search-heading {
    margin-bottom: 20px !important;
}

/* Search results table spacing */
.gewerbesteuer-search-form + .gewerbesteuer-data-table,
.gewerbesteuer-search-form + .gewerbesteuer-error + .gewerbesteuer-data-table {
    margin-top: 0;
}

/* H2, H3 header on data page */
.gewerbesteuer-data-h2, .gewerbesteuer-data-h3 {
    margin-bottom: 15px !important;
    color: #1a5276;
    font-weight: 600;
}

/* Text paragraph on data page */
.gewerbesteuer-data-paragraph {
    margin-top: 10px;
    margin-bottom: 20px;
    color: #555;
    line-height: 1.6;
}

/* Data table */
.gewerbesteuer-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
}

/* Header */
.gewerbesteuer-data-table th {
    background: linear-gradient(135deg, #1a5276, #154360);
    color: #fff;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* All cells */
.gewerbesteuer-data-table th,
.gewerbesteuer-data-table td {
    border: none;
    border-bottom: 1px solid #e8e8e8;
    padding: 14px 16px;
    text-align: left;
}

.gewerbesteuer-data-table th {
    padding: 16px;
}

/* Last row no border */
.gewerbesteuer-data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Cell with the count locations */
.gewerbsteuer-data-count-locations {
    padding-right: 16px !important;
    text-align: right !important;
}

/* Link color */
.gewerbesteuer-data-table a {
    color: #1a5276;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.gewerbesteuer-data-table a:hover {
    color: #2874a6;
    text-decoration: underline;
}

/* Row striping */
.gewerbesteuer-data-table tbody tr {
    background: #fff;
    transition: background-color 0.15s ease;
}

.gewerbesteuer-data-table tbody tr:hover {
    background: #f8f9fa;
}

/* Odd row */
.gewerbesteuer-data-odd {
    background: #f8fafc !important;
}

/* Summary row */
.gewerbesteuer-data-summary {
    background: #e8f4f8 !important;
    font-weight: 600;
}

/* Responsive table */
@media (max-width: 768px) {
    .gewerbesteuer-data-table {
        font-size: 14px;
    }
    
    .gewerbesteuer-data-table th,
    .gewerbesteuer-data-table td {
        padding: 10px 12px;
    }
    
    .gewerbesteuer-data-table th {
        font-size: 12px;
    }
}

/* *** Tax calculation form *** */
/* Form field */
input {
    font-size: 24px !important;
    height: 30px !important;
    line-height: 30px !important;
    text-indent: 5px !important;
    background: #eee !important;
    border: 1px solid LightGray  !important;
    width: 304px;
}

/* Form field focus*/
input:focus, textarea:focus {
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(62, 168, 236, 0.6) !important;
}

/* Action button */
a.gewerbesteuer-action-button,
a.gewerbesteuer-action-button:focus {
    display: inline-block;
    background: linear-gradient(135deg, #1a5276, #154360);
    color: #fff !important;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    padding: 12px 24px;
    text-decoration: none !important;
    text-shadow: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

a.gewerbesteuer-action-button:hover {
    background: linear-gradient(135deg, #2874a6, #1a5276) !important;
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Headings */
.gewerbesteuer-rechner-heading {
   color: #2a658f; 
   font-size: 15px;
}

/* Line height of the table */
.gewerbesteuer-rechner-tabelle {
   line-height: normal !important;
}

/* Option cell in the table */
.gewerbesteuer-rechner-option {
   font-size: 20px; 
   padding-left: 5px;
}

/* First paragraph */
.gewerbesteuer-rechner-first-p {
   margin-top: 20px;
}

/* Paragraph with the button */
.gewerbesteuer-rechner-button-p {
   margin-left: -30px; 
   margin-top: 35px;
}

/* Cell with the radion button in the table */
.gewerbesteuer-rechner-radio {
   padding-left: 15px;
}

/* Result font size of the calculation */
.gewerbesteuer-rechner-results {
    font-size: 18px;
}

/* *** Registration form *** */
/* Input field */
.gewerbesteuer-registration input {
   padding: 0 !important;
   font-size: 13px !important;
   line-height: 13px !important;
   height: 25px !important;
   width: 400px !important;
}

/* Textarea */
.gewerbesteuer-registration textarea {
   border: 1px solid LightGray  !important;
   height: 100px !important;
   width: 400px !important;
}

/* Table cell */
.gewerbesteuer-registration td {
    padding-left: 10px;
}

/* Table cell for the acceptance text */
.gewerbesteuer-registration-acceptance-cell {
    padding-top: 10px;
}

/* Table cell for the submit button */
.gewerbesteuer-registration-submit-cell {
    padding-top: 30px;
}

.gewerbesteuer-registration-submit {
    margin-left: 0 !important;
}

/* *** Menu *** */
/* Color of the menu texts */
.gewerbsteuer-menu {
    color: #808080;
}

/* *** Footer *** */
/* Link color for the footer */
.gewerbesteuer-social a {
    color: #fff;
}

.gewerbesteuer-social a:hover {
    color: grey;
}

/* Hover color for the social icons */
.gewerbesteuer-social a:hover {
    color: grey;
    text-decoration: none;
}

/* List for the social icons */
.gewerbesteuer-social {
    list-style-type: none;
    list-style-position: inside;
    margin-top: -10px; 
    margin-left: -7px;
}

/* Size of the social icon */
.gewerbesteuer-social-icon {
    font-size: 25px;
}

/* Google plus list item */
.gewerbesteuer-google-plus-item {
    margin-top: 4px;
}

/* *** Custom Content Section *** */
.gewerbesteuer-custom-content {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-left: 4px solid #2a658f;
    border-radius: 0 8px 8px 0;
}

.gewerbesteuer-custom-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2a658f;
    font-size: 20px;
}

.gewerbesteuer-custom-content p {
    line-height: 1.7;
    color: #333;
}

.gewerbesteuer-custom-content p:last-child {
    margin-bottom: 0;
}

/* *** Page Layout with Ads *** */
.gewerbesteuer-layout {
    display: flex !important;
    flex-direction: row !important;
    gap: 30px !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
}

.gewerbesteuer-main-content {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    max-width: calc(100% - 330px) !important;
}

.gewerbesteuer-sidebar {
    flex: 0 0 300px !important;
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    position: sticky;
    top: 100px;
}

@media (max-width: 992px) {
    .gewerbesteuer-layout {
        flex-direction: column !important;
        flex-wrap: wrap !important;
    }
    
    .gewerbesteuer-main-content {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .gewerbesteuer-sidebar {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 400px !important;
        position: static;
    }
}

/* Sidebar Container - STRICT overflow control */
.gewerbesteuer-sidebar {
    max-width: 300px !important;
    width: 300px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.gewerbesteuer-sidebar img,
.gewerbesteuer-sidebar .gewerbesteuer-ad-image,
.gewerbesteuer-ads img,
.gewerbesteuer-ad-item img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

.gewerbesteuer-ads,
.gewerbesteuer-ad-item {
    max-width: 100% !important;
    overflow: hidden !important;
}

.gewerbesteuer-ad-link {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

/* Sidebar Title */
.gewerbesteuer-sidebar-title {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

/* Ad Booking Link */
.gewerbesteuer-ad-booking-link {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    text-align: center;
}

.gewerbesteuer-ad-booking-link a {
    font-size: 12px;
    color: #1a5276;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
}

.gewerbesteuer-ad-booking-link a:hover {
    opacity: 1;
    color: #27ae60;
    text-decoration: underline;
}

/* Ensure layout breaks out of narrow containers */
.gewerbesteuer-layout {
    box-sizing: border-box !important;
}

.gewerbesteuer-layout *,
.gewerbesteuer-layout *::before,
.gewerbesteuer-layout *::after {
    box-sizing: border-box !important;
}

/* Make Hebesatz pages use full width for sidebar layout */
body.gewerbesteuer-has-sidebar .entry-content,
body.gewerbesteuer-has-sidebar .page-content,
body.gewerbesteuer-has-sidebar .post-content,
body.gewerbesteuer-has-sidebar article .content,
body.gewerbesteuer-has-sidebar .content-area,
body.gewerbesteuer-has-sidebar .site-content .container,
body.gewerbesteuer-has-sidebar main .container,
body.gewerbesteuer-has-sidebar .main-content {
    max-width: 1200px !important;
    width: 100% !important;
}

/* Override card/box styles that might constrain width */
body.gewerbesteuer-has-sidebar .card,
body.gewerbesteuer-has-sidebar .box,
body.gewerbesteuer-has-sidebar [class*="content-box"] {
    max-width: 100% !important;
}

/* *** Ads Styling *** */
.gewerbesteuer-ads {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gewerbesteuer-ad-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.gewerbesteuer-ad-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gewerbesteuer-ad-title {
    margin: 0;
    padding: 12px 15px 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.gewerbesteuer-ad-link {
    display: block;
    text-decoration: none;
}

.gewerbesteuer-ad-image {
    width: 100%;
    height: auto;
    display: block;
}

.gewerbesteuer-ad-description {
    margin: 0;
    padding: 12px 15px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* Banner Ads */
.gewerbesteuer-banner-wrapper {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.gewerbesteuer-ads-banner {
    flex-direction: row;
    justify-content: center;
}

.gewerbesteuer-ads-banner .gewerbesteuer-ad-item {
    max-width: 970px;
    width: 100%;
}

.gewerbesteuer-ads-banner .gewerbesteuer-ad-title {
    text-align: center;
}

/* AdSense-Fill: gleiches Styling wie gebuchte Anzeigen */
.gewerbesteuer-ad-item-adsense {
    min-height: 90px;
}

.gewerbesteuer-ad-item-adsense .adsbygoogle {
    overflow: hidden;
}

/* Source styling */
.gewerbesteuer-source {
    font-size: 12px;
    color: #888;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}