/**
 * Profile UI Styles for [bricx_account_details] shortcode
 */

/* Profile Layout */
.bricx-account-layout { 
    display: flex; 
    flex-wrap: wrap; 
    margin: 0 auto;
}
.bricx-account-sidebar { 
    flex: 0 0 100%; 
    width: 100%; 
    display: flex; 
    gap: 1.5em; 
}
.bricx-account-content { 
    flex: 0 0 100%; 
    width: 100%; 
}

/* Tab Links */
.bricx-tab-link, .bricx-menu-link { 
    display: block; 
    padding: 14px 20px; 
    text-decoration: none !important; 
    color: #fff; 
    border-radius: 99px; 
    font-size: 14px;
    font-weight: 500; 
    line-height: 1;
    transition: all 0.5s ease;
    white-space: nowrap;
}
.bricx-tab-link:hover, .bricx-menu-link:hover{ 
    color: #d8ff64; 
    background-image: linear-gradient(90deg, rgba(255, 255, 255, .1), transparent 95%);
    transform: translateX(5px);
}
.bricx-tab-link.active, .bricx-menu-link.active{
    color: #47d1d4;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, .2), transparent 95%);
}

/* Desktop Grid (1/3 Sidebar, 2/3 Content) */
@media(min-width: 768px) {
    .bricx-account-sidebar { 
        flex: 0 0 250px; 
        flex-direction: column; 
        border-bottom: none; 
        padding-right: 1.5em; 
        padding-bottom: 0;
        margin-bottom: 0;
        height: fit-content; 
        gap: .5em;
    }
    .bricx-account-content { 
        flex: 1;
        width: auto;
        padding-left: 3em;
        border-left: solid 1px rgba(255, 255, 255, .25);
    }
}

/* Hiding/Showing */
.bricx-tab-content { 
    display: none; 
    animation: fadeIn 0.3s ease; 
}
.bricx-tab-content.active { 
    display: block; 
}
@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(5px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* Form Tweaks */
.bricx-tab-content h3 { 
    margin-top: 0; 
    font-size: 1.5em; 
    margin-bottom: 20px; 
}

.form-row:has(label[for="account_display_name"]),
#bricx-tab-address h2 {
    display: none !important;
}

.bricx-tab-content button[type="submit"]{
    width: 100%;
}

/* Display Name */
.bricx-account-display-name{
    padding: 0 20px 20px;
}
#bricx-account-avatar{
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
#bricx-account-avatar:hover{
    filter: brightness(1.15);
    transform: rotate(-10deg);
}
.bricx-account-link{
    color: #fff;
}
.bricx-account-link:hover{
    color: #d8ff64;
}
.bricx-account-name{
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5;
    margin: .25em 0;
}
.bricx-account-menu{
    display: grid;
}

#bricx_gender_readonly,
#bricx_nationality_readonly{
    opacity: .5;
    filter: grayscale(1);
}

@media (min-width: 768px){
    .bricx-account-menu{
        gap: .5em;
    }
}
@media (max-width: 767px) {
    .bricx-account-sidebar{
        display: grid;
        margin-bottom: 1em;
    }
    /*
    .bricx-account-menu{
        grid-template-columns: 1fr 1fr;
    }
    .bricx-tab-link:last-child:hover{ 
        background-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, .1) 95%);
    }
    .bricx-tab-link:last-child:hover,
    .bricx-tab-link:last-child.active,
    .bricx-menu-link:last-child:hover,
    .bricx-menu-link:last-child.active {
        background-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2) 95%);
    }
    */
    .bricx-account-menu{
        display: flex;
        overflow-x: scroll;
        gap: 1em;
        padding-right: 2em;
        -webkit-mask-image: linear-gradient(to left, transparent 0%, black 10%);
        -webkit-mask-repeat: no-repeat;
        -webkit-mask-size: 100% 100%;
        mask-image: linear-gradient(to left, transparent 0%, black 10%);
        mask-repeat: no-repeat;
        mask-size: 100% 100%;
    }
    .bricx-account-menu::-webkit-scrollbar{
        opacity: 0;
    }
    .bricx-account-display-name{
        display: flex;
        gap: 20px;
        align-items: center;
        padding: 0;
    }
    .bricx-account-name{
        margin-top: 0;
    }
    .bricx-tab-link:hover, .bricx-menu-link:hover{
        transform: translateX(0);
    }
    .bricx-tab-link.active,
    .bricx-menu-link.active{
        transform: translateX(0);
    }
    .bricx-tab-content h1,
    .bricx-tab-content h3{
        display: none;
    }
}

/* Category Badge */
.bricx-account-category{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}
.bricx-account-category div{
    background: rgba(255, 255, 255, .1);
    border: solid 1px rgba(255, 255, 255, .1);
    border-radius: 99px;
    padding: 4px 10px;
    word-break: keep-all;
    font-size: .85em;
    line-height: 1;
}
.bricx-account-category div:hover{
    background: rgba(255, 255, 255, .2);
    border: solid 1px rgba(255, 255, 255, .3);
}

/* Order Page */
.bricx-order-history .woocommerce-MyAccount-orders tr th,
.bricx-order-history .woocommerce-MyAccount-orders tr td{
    border-color: rgba(255, 255, 255, .5) !important;
    padding: 10px;
}
.bricx-order-history .woocommerce-MyAccount-orders tr th{
    border-bottom: solid 1px;
}
.page-title{
    margin-bottom: .5em;
}
.bricx-order-history .woocommerce-MyAccount-orders thead tr th,
.bricx-order-history .woocommerce-MyAccount-orders tbody tr td:first-child{
    font-weight: 600;
}
.bricx-order-history .woocommerce-MyAccount-orders tbody tr td:last-child{
    text-align: right;
}
.bricx-order-history .woocommerce-MyAccount-orders .button{
    padding: 5px 15px;
    text-transform: lowercase;
}
.bricx-order-history .woocommerce-MyAccount-orders .button:hover{
    background-color: #fc4c02;
    color: #fff;
}
.woocommerce-orders-table__cell-order-item{
    min-width: 111px;
}
.bricx-order-view{
    max-width: 800px;
    margin: auto;
}

/* --------------------------------------------------------- */
/* Event Order View Styles                                   */
/* --------------------------------------------------------- */

.bricx-qr-code-border {
	position: relative;
	border-radius: 16px;
	padding: 2.5px;
	overflow: hidden;
	margin-bottom: 30px;
	/*background: rgba(255, 255, 255, .75);*/
    background: #ff4d9e;
}

.bricx-qr-code-border::before {
  content: "";
  position: absolute;
  inset: 0;
  /*background: repeating-linear-gradient(90deg, transparent 0, #fff, transparent, #fff, transparent);*/
  background:repeating-linear-gradient(90deg, #ff4d9e 0, #fc4c02, #d8ff64, #47d1d4, #ff4d9e);
  background-size: 200% 100%;
  animation: gradient-border-move 5s linear infinite;
  z-index: 0;
}

@keyframes gradient-border-move {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 200% 0;
  }
}

/* QR Code Section */
.bricx-qr-code-container {
  position: relative;
  border-radius: 14px;          /* slightly smaller than parent */
  background: #000;             /* background inside the border */
  padding: 20px;
  text-align: center;
  z-index: 1;
}
/* Use block display for both the container (frontend) and img (email) */
.bricx-qr-code-image {
    display: block;
    margin: 0 auto;
    width: 150px;
    height: 150px;
    min-width: 150px;
    min-height: 150px;
    /* White background so black QR code is visible even on dark themes */
    background-color: #fff; 
    filter: invert(1);
    -webkit-filter: invert(1);
}

/* Ensure the generated IMG or CANVAS inside the div container fills the space */
.bricx-qr-code-image img,
.bricx-qr-code-image canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.bricx-qr-code-title {
    font-size: 16px;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bricx-qr-code-number {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
	margin: 1em 0 0;
    font-family: monospace;
}

.bricx-qr-code-desc {
    font-size: 10px;
    color: rgba(255,255,255,.5);
    margin: 0;
}

/* Registration Info Table */
.woocommerce-order-event-registration {
    margin: 2em 0;
    padding: 0;
}
.woocommerce-order-event-registration__title {
    font-size: 1.5em;
    margin: 0 0 1em 0;
    font-weight: 600;
    text-transform: none;
}
.woocommerce-table--event-registration{
    width: 100%;
}
.woocommerce-table--event-registration th {
    font-weight: 600;
    background: rgba(0,0,0,0.02);
    width: 40%;
}

/* Hide classic billing/shipping addresses on View Order / Thank You 
   ONLY for Event Orders (targeted via body class) */
body.bricx-is-event-order .woocommerce-customer-details,
body.bricx-is-event-order .woocommerce-columns--addresses,
body.bricx-is-event-order .woocommerce-column--billing-address,
body.bricx-is-event-order .woocommerce-column--shipping-address,
/* Hide Block-based order confirmation details */
body.bricx-is-event-order .wp-block-woocommerce-order-confirmation-billing-wrapper,
body.bricx-is-event-order .wp-block-woocommerce-order-confirmation-shipping-wrapper,
body.bricx-is-event-order .wc-block-order-confirmation-billing-wrapper,
body.bricx-is-event-order .wc-block-order-confirmation-shipping-wrapper,
body.bricx-is-event-order .wc-block-order-confirmation-billing-address,
body.bricx-is-event-order .wc-block-order-confirmation-shipping-address,
body.bricx-is-event-order .woocommerce-customer-details--phone {
    display: none !important;
}

/* Gradient Name */
.bricx-account-link{
    display: inline-block;
    text-decoration: none;

    /* Make text transparent so gradient shows */
    color: transparent;

    /* Apply gradient like a texture */
    background: linear-gradient(
        90deg,
        #fc4c02,
        #ff4d9e,
        #ffcc00,
        #d8ff64,
        #47d1d4,
        #d8ff64,
        #ffcc00,
        #ff4d9e,
        #fc4c02
    );

    background-size: 1000% 100%;

    /* Clip gradient to text */
    -webkit-background-clip: text;
            background-clip: text;

    /* Smooth scroll animation */
    animation: textGradientSlide 65s linear infinite;
}

@keyframes textGradientSlide {
    0%   { background-position: 0% 0; }
    100% { background-position: -900% 0; }
}