/* Kontur 4 Plugin Styles */

:root {
    --sq-blue: #14aecf;
    --sq-blue-dark: #0e7a8c;
    --button-radius: 10px;
    --menu-top-margin: 235px;
}

.kontur4-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.kontur4-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: var(--button-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.kontur4-section h1 {
    color: #282d5c;
    margin-bottom: 15px;
    font-size: 2.2em;
}

.kontur4-section h2 {
    color: #282d5c;
    margin-bottom: 15px;
    font-size: 1.8em;
    border-bottom: 2px solid #14aecf;
    padding-bottom: 8px;
}

.kontur4-welcome-message {
    font-size: 1.1em;
    color: #666;
    line-height: 1.6;
}

.kontur4-section-content {
    margin-top: 15px;
}

/* Dashboard Two-Column Layout */
.kontur4-dashboard-columns {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 20px;
}

.kontur4-dashboard-content {
    flex: 2;
    min-width: 0;
}

.kontur4-dashboard-avatar {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Responsive behavior for dashboard columns */
@media (max-width: 768px) {
    .kontur4-dashboard-columns {
        flex-direction: column;
        gap: 20px;
    }
    
    .kontur4-dashboard-content {
        order: 2;
    }
    
    .kontur4-dashboard-avatar {
        order: 1;
        align-self: center;
        justify-content: center;
    }
}

/* WooCommerce Account Page Integration */
.woocommerce-account .woocommerce-MyAccount-content {
    background: transparent;
}

/* Hide original WooCommerce Navigation */
.woocommerce-MyAccount-navigation {
    display: none !important;
}

/* Floating Navigation Menu Toggle */
.kontur4-mobile-menu-toggle {
    position: fixed;
    top: 75px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--sq-blue);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(20, 174, 207, 0.4);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kontur4-mobile-menu-toggle:hover {
    background: #0f94b3;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(20, 174, 207, 0.6);
}

.kontur4-mobile-menu-toggle.active {
    background: #cf2e2e;
    transform: rotate(180deg);
}

.kontur4-mobile-menu-toggle i {
    transition: transform 0.3s ease;
}

/* Desktop positioning - move to left */
@media (min-width: 769px) {
    .kontur4-mobile-menu-toggle {
        left: 20px;
        right: auto;
    }
}

/* Floating Navigation Dropdown */
.kontur4-mobile-dropdown {
    position: fixed;
    top: 145px;
    right: 20px;
    width: 250px;
    border-radius: 12px;
    z-index: 1000;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.kontur4-mobile-dropdown.kontur4-dropdown-open {
    max-height: 600px;
    opacity: 1;
    transform: translateY(0);
}

/* Desktop positioning and always open */
@media (min-width: 769px) {
    .kontur4-mobile-dropdown {
        left: 20px;
        right: auto;
        top: var(--menu-top-margin);
        max-height: 600px;
        opacity: 1;
        transform: translateY(0);
    }
    
    .kontur4-mobile-menu-toggle {
        display: none;
    }
}

.kontur4-mobile-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.kontur4-mobile-dropdown ul li {
    margin: 0;
    border-bottom: 5px solid #f0f0f000;
}

.kontur4-mobile-dropdown ul li:last-child {
    border-bottom: none;
}

.kontur4-mobile-dropdown ul li a,
.pure-button-style .kontur4-mobile-dropdown ul li a.button {
    display: block !important;
    padding: 12px 20px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    border-radius: 0;
    text-align: left;
    background: var(--pure-color);
    transform: translateX(0);
}

.kontur4-mobile-dropdown ul li:first-child a {
    border-radius: 12px 12px 0 0;
}

.kontur4-mobile-dropdown ul li:last-child a {
    border-radius: 0 0 12px 12px;
}

.kontur4-mobile-dropdown ul li a:hover,
.kontur4-mobile-dropdown ul li.is-active a,
.pure-button-style .kontur4-mobile-dropdown ul li a.button:hover,
.pure-button-style .kontur4-mobile-dropdown ul li.is-active a.button {
    background: var(--pure-color-2) !important;
    color: white !important;
    transform: translateX(10px);
    box-shadow: none !important;
}

/* Mobile Menu States */
@media (max-width: 768px) {
    .kontur4-mobile-menu-toggle {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    
    .woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link,
    .woocommerce-MyAccount-navigation > .woocommerce-MyAccount-navigation-link,
    .woocommerce-account .woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link {
        display: none !important;
        visibility: hidden !important;
    }
    
    .woocommerce-MyAccount-navigation {
        height: 0 !important;
        overflow: hidden !important;
    }
}

/* Desktop menu adjustments for full width */
@media (min-width: 769px) {
    .woocommerce-MyAccount-navigation {
        width: 100%;
        display: flex;
    }
    
    .woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link {
        flex: 1 1 auto;
    }
}

/* Extra responsive adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link a {
        padding: 12px 8px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .kontur4-mobile-dropdown {
        right: 10px;
        width: calc(100vw - 20px);
        max-width: 300px;
    }
}

/* Transaction table styles */
.kontur-transactions {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    background: #fff;
}

.kontur-transactions th,
.kontur-transactions td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.kontur-transactions th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #282d5c;
}

.kontur-transactions tr:nth-child(even) {
    background-color: #f9f9f9;
}

.kontur-transactions tr:hover {
    background-color: #f0f8ff;
}

/* Certificate styles */
.kontur-certificates-list {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    background: #fff;
}

.kontur-certificates-list th,
.kontur-certificates-list td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.kontur-certificates-list th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #282d5c;
}

.kontur-certificates-list tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Selfies Grid Layout */
.kontur-selfies-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.kontur-selfie-item {
    width: calc(33.333% - 20px);
    margin: 0 10px 20px;
    box-sizing: border-box;
}

.kontur-selfie-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    text-align: center;
}

.kontur-selfie-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--button-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.kontur-selfie-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.kontur-selfie-container img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
}

.kontur-selfie-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

/* Button styles */
.kontur-button {
    padding: 8px 12px;
    margin: 2px;
    border: none;
    border-radius: var(--button-radius);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.kontur-button i {
    margin-right: 5px;
}

.kontur-button.download {
    background-color: var(--sq-blue);
    color: white;
}

.kontur-button.download:hover {
    background-color: #0f94b3;
    transform: translateY(-1px);
}

.kontur-button.delete {
    background-color: #cf2e2e;
    color: white;
}

.kontur-button.delete:hover {
    background-color: #b12626;
    transform: translateY(-1px);
}

.kontur-button.validate {
    background-color: #ff6900;
    color: white;
}

.kontur-button.validate:hover {
    background-color: #e55a00;
    transform: translateY(-1px);
}

.kontur-generate-cert {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: var(--button-radius);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin: 2px;
    font-weight: 500;
}

.kontur-generate-cert:hover {
    background-color: #3a7bc8;
    transform: translateY(-1px);
}

.kontur-generate-cert i,
.kontur-cert-exists i {
    margin-right: 5px;
}

.kontur-cert-exists {
    color: #4CAF50;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}

/* Modal styles */
.kontur-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

.kontur-modal-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    width: auto;
    height: auto;
    border-radius: var(--button-radius);
}

.kontur-modal-close {
    position: absolute;
    right: 25px;
    top: 15px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.kontur-modal-close:hover {
    color: #14aecf;
}

/* Fast selling event styles */
.fast-selling-event {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #14aecf;
    border-radius: 0 8px 8px 0;
}

.fast-selling-event h3 {
    color: #282d5c;
    margin-bottom: 10px;
}

.fast-selling-event p {
    margin-bottom: 8px;
}

.fast-selling-event .button {
    background-color: var(--sq-blue);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: var(--button-radius);
    display: inline-block;
    transition: background-color 0.3s ease;
}

.fast-selling-event .button:hover {
    background-color: #0f94b3;
}

/* Certificate validation styles */
.kontur-certificate-validation {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.kontur-certificate-validation.error {
    text-align: center;
    color: #dc3545;
    font-size: 18px;
    margin: 40px 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .kontur-selfie-item {
        width: calc(50% - 20px);
    }
    
    .kontur4-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .kontur4-section h1 {
        font-size: 1.8em;
    }
    
    .kontur4-section h2 {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .kontur-selfie-item {
        width: calc(100% - 20px);
    }
    
    .kontur-transactions,
    .kontur-certificates-list {
        font-size: 0.9em;
    }
    
    .kontur-transactions th,
    .kontur-transactions td,
    .kontur-certificates-list th,
    .kontur-certificates-list td {
        padding: 8px;
    }
    
    .kontur4-section {
        padding: 12px;
    }
}

/* QR Code styling */
.kontur4-qr-code img {
    display: block;
    margin: 20px auto;
    border: 2px solid #ddd;
    border-radius: var(--button-radius);
    padding: 10px;
    background: white;
}

/* Avatar Tile Styles */
.kontur4-avatar-tile {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(20, 174, 207, 0.2);
    width: 100%;
    max-width: 300px;
}

/* Dashboard position - integrated into layout */
.kontur4-avatar-tile.kontur4-avatar-dashboard {
    position: static;
    margin: 0;
}

/* Legacy positioning for old mobile/desktop positions (if still used) */
.kontur4-avatar-tile.kontur4-avatar-desktop {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 280px;
    z-index: 1002;
}

.kontur4-avatar-tile.kontur4-avatar-mobile {
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 320px;
    z-index: 1002;
}

.kontur4-avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.kontur4-avatar-image {
    width: 200px;
    height: 200px;
    border-radius: 100px; /* Half of width/height for perfect circle */
    object-fit: cover;
    border: 4px solid var(--sq-blue);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(20, 174, 207, 0.3);
}

/* Dashboard layout - keep original horizontal layout for larger screens */
.kontur4-avatar-tile.kontur4-avatar-dashboard .kontur4-avatar-container {
    flex-direction: column;
    gap: 15px;
}

.kontur4-avatar-tile.kontur4-avatar-dashboard .kontur4-avatar-image {
    width: 200px;
    height: 200px;
    border-radius: 100px;
}

.kontur4-avatar-info {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.kontur4-avatar-name {
    font-size: 1.2em;
    font-weight: 600;
    color: #282d5c;
    margin: 0 0 8px 0;
}

.kontur4-avatar-email {
    font-size: 0.9em;
    color: #666;
    margin: 0;
    word-break: break-word;
}

.kontur4-avatar-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.kontur4-avatar-upload-btn,
.kontur4-avatar-delete-btn {
    background: var(--sq-blue);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    box-shadow: 0 2px 8px rgba(20, 174, 207, 0.3);
}

.kontur4-avatar-upload-btn:hover {
    background: #0f8da1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 174, 207, 0.4);
}

.kontur4-avatar-delete-btn {
    background: #cf2e2e;
    box-shadow: 0 2px 8px rgba(207, 46, 46, 0.3);
}

.kontur4-avatar-delete-btn:hover {
    background: #a12424;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(207, 46, 46, 0.4);
}

/* Hide legacy avatar positioning on all screens */
.kontur4-avatar-tile.kontur4-avatar-desktop,
.kontur4-avatar-tile.kontur4-avatar-mobile {
    display: none;
}

/* Event Tiles Grid */
.kontur4-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Desktop: Max 3 tiles per row */
@media (min-width: 1024px) {
    .kontur4-events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile: 1 tile per row */
@media (max-width: 768px) {
    .kontur4-events-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Event Tile Container */
.kontur4-event-tile-container {
    perspective: 1000px;
    height: 280px;
    position: relative;
    z-index: 1;
    overflow: hidden; /* Contain the flipped tile */
}

/* Increase z-index when flipping to ensure it appears above adjacent tiles */
.kontur4-event-tile-container:has(.kontur4-event-tile-flippable.flipped),
.kontur4-event-tile-container .kontur4-event-tile-flippable.flipped {
    z-index: 10;
}

/* Fallback for browsers that don't support :has() */
.kontur4-event-tile-flippable.flipped {
    z-index: 10;
}

/* Event Tile Base Styles */
.kontur4-event-tile {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: default;
}

.kontur4-event-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Flippable Tile Styles */
.kontur4-event-tile-flippable {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.kontur4-event-tile-flippable.flipped {
    transform: rotateY(180deg);
}

.kontur4-event-tile-front,
.kontur4-event-tile-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.kontur4-event-tile-front {
    background: #fff;
    border: 1px solid #e1e5e9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kontur4-event-tile-back {
    background: linear-gradient(135deg, var(--sq-blue) 0%, var(--sq-blue-dark) 100%);
    color: white;
    transform: rotateY(180deg);
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Event Header */
.kontur4-event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.kontur4-event-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #282d5c;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.kontur4-event-status {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 500;
    margin-left: 10px;
    white-space: nowrap;
}

.kontur4-event-status.purchased {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.kontur4-event-status.not-purchased {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Event Content */
.kontur4-event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.kontur4-event-date {
    font-size: 0.95em;
    color: #666;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kontur4-event-date i {
    color: #14aecf;
}

.kontur4-event-message {
    font-size: 1em;
    color: #333;
    margin: 0 0 15px 0;
    flex: 1;
}

.kontur4-event-flip-hint {
    font-size: 0.85em;
    color: #14aecf;
    font-style: italic;
    text-align: center;
    margin-top: auto;
    padding: 10px;
    background: rgba(20, 174, 207, 0.1);
    border-radius: var(--button-radius);
}

/* Event Actions */
.kontur4-event-actions {
    margin-top: auto;
}

.kontur4-event-button {
    display: inline-block;
    background: var(--sq-blue);
    color: white;
    padding: 12px 24px;
    border-radius: var(--button-radius);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.kontur4-event-button:hover {
    background: #0f94b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(20, 174, 207, 0.3);
    color: white;
    text-decoration: none;
}

/* Ticket Back Side */
.kontur4-event-ticket {
    text-align: center;
}

.kontur4-event-ticket h4 {
    font-size: 1.4em;
    margin: 0 0 20px 0;
    color: white;
}

.kontur4-event-qr-placeholder {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: var(--button-radius);
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kontur4-qr-code {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.8);
    word-break: break-all;
    text-align: center;
    padding: 10px;
}

.kontur4-event-title-small {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 500;
}

/* Consultation Section Styles */
.kontur4-consultation-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-top: 30px;
    align-items: center;
}

.kontur4-consultation-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.kontur4-consultation-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.kontur4-consultation-content {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kontur4-consultation-text {
    margin-bottom: 20px;
}

.kontur4-consultation-text p {
    font-size: 1.1em;
    line-height: 1.6;
    color: #333;
    margin: 0;
    text-align: center;
}

.kontur4-consultation-button {
    text-align: center;
}

.kontur4-consultation-link {
    display: inline-block;
    background: linear-gradient(135deg, var(--sq-blue) 0%, var(--sq-blue-dark) 100%);
    color: white;
    padding: 12px 24px;
    border-radius: var(--button-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(20, 174, 207, 0.3);
}

.kontur4-consultation-link:hover {
    background: linear-gradient(135deg, var(--sq-blue-dark) 0%, var(--sq-blue) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(20, 174, 207, 0.4);
    color: white;
    text-decoration: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .kontur4-consultation-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .kontur4-consultation-image img {
        height: 200px;
        object-position: center;
    }
    
    .kontur4-consultation-content {
        height: auto;
        padding: 20px;
    }
    
    .kontur4-consultation-text p {
        font-size: 1em;
    }
}

/* Accordion Styles */
.kontur4-accordion .kontur4-accordion-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kontur4-accordion .kontur4-accordion-header:hover {
    color: var(--sq-blue);
}

.kontur4-accordion-icon {
    font-size: 0.8em;
    transition: transform 0.3s ease;
    color: var(--sq-blue);
    font-weight: bold;
}

.kontur4-accordion.active .kontur4-accordion-icon {
    transform: rotate(180deg);
}

.kontur4-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.kontur4-accordion.active .kontur4-accordion-content {
    max-height: 2000px;
    transition: max-height 0.4s ease-in;
}

/* WooCommerce Purchases Styles */
.kontur4-wc-purchases {
    width: 100%;
}

.kontur4-purchases-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.kontur4-purchase-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: var(--button-radius);
    padding: 20px;
    transition: box-shadow 0.3s ease;
}

.kontur4-purchase-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.kontur4-purchase-header {
    margin-bottom: 15px;
}

.kontur4-purchase-info h4 {
    margin: 0 0 10px 0;
    color: #282d5c;
    font-size: 1.3em;
}

.kontur4-purchase-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.kontur4-purchase-meta span {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.purchase-date {
    background: #e3f2fd;
    color: #1976d2;
}

.purchase-status {
    color: #fff;
}

.purchase-status.status-completed {
    background: #4caf50;
}

.purchase-status.status-processing {
    background: #ff9800;
}

.purchase-status.status-on-hold {
    background: #9e9e9e;
}

.purchase-total {
    background: var(--sq-blue);
    color: #fff;
    font-weight: bold;
}

.kontur4-purchase-items {
    margin-bottom: 15px;
    background: #fff;
    border-radius: 6px;
    padding: 15px;
}

.kontur4-purchase-product {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.kontur4-purchase-product:last-child {
    border-bottom: none;
}

.product-name {
    color: #282d5c;
    font-weight: 500;
}

.product-quantity {
    color: #666;
    font-size: 0.9em;
}

.kontur4-purchase-actions {
    text-align: right;
}

.kontur4-purchase-view-btn {
    background: var(--sq-blue);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: var(--button-radius);
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.kontur4-purchase-view-btn:hover {
    background: var(--sq-blue-dark);
    text-decoration: none;
}

/* Mobile responsiveness for purchases */
@media (max-width: 768px) {
    .kontur4-purchase-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .kontur4-purchase-actions {
        text-align: left;
        margin-top: 10px;
    }
}

/* Hide floating menu on WooCommerce subpages by default */
body[class*="view-order"] .kontur4-mobile-menu-toggle,
body[class*="view-order"] .kontur4-mobile-dropdown,
body[class*="edit-address"] .kontur4-mobile-menu-toggle,
body[class*="edit-address"] .kontur4-mobile-dropdown,
body[class*="edit-account"] .kontur4-mobile-menu-toggle,
body[class*="edit-account"] .kontur4-mobile-dropdown {
    display: none !important;
}