/* TICKET */

button {
	cursor: pointer;
}

.ticket-id {
	font-size:20px;
	margin-bottom:0px;
	float:left;
	white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-headline {
	font-size:20px;
	margin-bottom:0px;
    display: table-cell;
    vertical-align: middle;
    height: 50px;
    max-width:760px;
}

.navbar-toggler i {
	font-size:28px;
	color:#003e5a;
	position:absolute;
	right:15px;
}

/*Ticket Home*/

.summary {
	margin:0px;
}

.summary .summary-box:first-child {
	margin-left:0px;
}

.summary .summary-box:last-child {
	margin-right:0px;
}  

.summary-box {
	min-height: 58px;
	text-align:center;
	margin-left: 10px;
	border-radius: 8px;
	padding-right: 6px;
	padding-left: 6px;
}

.summary-name {
	font-size: 16px;
	margin-top:15px;	
}

.summary-num {
	font-size: 18px;
	font-weight:bold;
}

.summary .danger {
	color: #dc3545;
	background-color: rgba(220, 53, 69, 0.03);
	border: solid 1px rgba(220, 53, 69, 0.3);
}

.summary .warning {
	color: #ffc107;
	background-color: rgba(255, 193, 7, 0.03);
	border: solid 1px rgba(255, 193, 7, 0.3);
}

.summary .info {
	color: #17a2b8;
	background-color: rgba(23, 162, 184, 0.03);
	border: solid 1px rgba(23, 162, 184, 0.3);
}

.summary .replied {
	color: #90a1a4;
	background-color: rgba(78, 90, 91, 0.03);
	border: solid 1px rgba(119, 136, 141, 0.3);
}

.summary .success {
	color: #28a745;
	background-color: rgba(40, 167, 69, 0.03);
	border: solid 1px rgba(40, 167, 69, 0.3);
}

.summary button {
	padding: 18px 30px;
}

/* Plus icon */

button.btn-plus {
	width: 70px;
	height: 70px;
	border-radius: 50%;
	padding: 0px;
	text-align: center;
	float:right;
	position: absolute;
    top: 110px;
    right: -100px;
}

.btn-plus i.fa-plus {
	font-size:48px;
	transition: .2s;
	margin-top: 7px;
    margin-left: 2px;
}

.btn-plus .plus-text {
	font-size: 13px;
	opacity: 0;
	transition: .2s;
	transform: translateY(0px);
}

.btn-plus:hover .fa-plus {
	transform: translateY(-5px);
	font-size:22px;
}

.btn-plus:hover .plus-text {
	transform: translateY(-7px);
	opacity: 1;
}

/*Ticket Home End*/

/* Ticket List */

.ticket-table {
	font-weight:normal;
}

.ticket-cell {

}

.ticket-filters {
	position: relative;
}

.ticket-table .ticket-filters {
	display: inline-table;
	width: 100%;
}

.ticket-table .ticket-filters  button, .top-bar-container button{
	padding: 5px 10px;
}

.ticket-table .ticket-filters  button.dropdown-toggle{
	display: flex;
	align-items: center;
}


.ticket-table .ticket-filters .t-filter {
	font-weight: bold;

}

.ticket-filters button {
	margin-left:5px;
}

.t-filter {
	font-size:14px;
}

.t-filter .btn-group ul label {
    display: inline-block;
    margin-bottom: 0px;
    color: #444;
    margin-left: 10px;
    line-height: 30px;
    font-size: 12px;
}

/*.t-filter .btn-group  .multiselect-selected-text {
	max-width:160px;
} */

.ticket-table .ticket-head-row {
	width: calc(100% - 15px);
	display: flex;
	margin-bottom: 12px;
}

.ticket-table .ticket-row {
	width:100%;
	display: flex;
	margin-bottom: 3px;
}

.ticket-table .ticket-row:nth-child(even) {
	background-color: #fafafa;
}

.ticket-table .ticket-row:nth-child(odd) {
	background-color: #f5f5f5;
}

.ticket-table .ticket-row .ticket-cell {
	/*border-right: 1px solid #ffffff;*/
}

.ticket-head-row .ticket-cell {
	display: inline-block;
	font-size:14px;
}

.ticket-head-row .ticket-cell {
	border-right: solid 1px #cecece;
}

.ticket-head-row .ticket-cell:last-child,
.ticket-head-row .ticket-cell:nth-child(9){
	padding-left: 10px;
	border: none;
}

.ticket-head-row .ticket-cell:nth-child(5),
.ticket-row .ticket-cell:nth-child(5),
.ticket-row .ticket-cell:nth-child(9),
.ticket-head-row .ticket-cell:nth-child(9){
	padding-left: 10px;
}

.ticket-head-row .gototicket {
	width: 93px;
	border: none;
}

.ticket-row .gototicket {
	width: 93px;
	margin: auto;
}

.gototicket .btn{
	height: 40px;
	cursor: pointer;
}

.ticket-table .status .bg-status {
	/*background-color: #e5e5e5;*/
}

.ticket-row .btn {
	display: none;
}

.ticket-row:hover .btn {
	display: block;
}

.ticket-footer-row {
	font-size: 16px;
    background-color: #02344b;
    padding: 10px;
    color: #fff;
}

.ticket-row .ticket-cell {
	display: table-cell;
	font-size:14px;
	vertical-align: middle;
}

.ticket-table .state {
	width: 68px;
	text-align: center;
	font-size:12px;
	align-content: center;
}

.ticket-table .createdby {
	width: 68px;
	text-align: center;
	align-content: center;
}

.ticket-table .priority {
	width: 42px;
	text-align: center;
	font-size:14px;
	display: flex;
	justify-content: center;
}

.ticket-table .id {
	width: 52px;
	font-size:14px;
	text-align: center;
}

.ticket-head-row .ticket-cell.id {
	display: block;
	text-align: center;
}

.ticket-table .id div:first-child {
	font-weight: bold;
}

.ticket-table .id div:last-child {
	height: 100%;
	align-content: center;
}

.ticket-table .title {
	font-size:14px;
	width:276px;
	align-content: center;
}

.ticket-table .assignee {
	width: 104px;
	text-align: center;
	align-content: center;
}

.ticket-table .reviewer {
	width: 104px;
	text-align: center;
	align-content: center;
}

.ticket-table .priority {
	width: 42px;
	text-align: center;
	align-content: center;
}

.ticket-table .status {
	width: 104px;
	text-align: center;
	align-content: center;
	font-size: 12px;
}

.ticket-table .dates {
	width: 180px;
	padding: 5px 0px;
	align-content: center;
}


.ticket-table .id span{
	padding: 10px 20px;
    font-weight: normal;
    border:solid 1px #cecece;
}

.ticket-head-row .createdby {
	width: 68px;
	text-align: center;
	font-size:14px;
}

.ticket-head-row .title {
	width: 276px;
	text-align: left;
	font-size:14px;
}

.ticket-head-row .state {
	width: 68px;
	text-align: center;
	font-size:14px;
}

.ticket-head-row .assignee {
	width: 104px;
	text-align: center;
	font-size:14px;
}

.ticket-head-row .reviewer {
	width: 104px;
	text-align: center;
	font-size:14px;
}

.ticket-head-row .status {
	width: 104px;
	text-align: center;
	font-size:14px;
}

.ticket-head-row .dates {
	width: 180px;
	text-align: left;
	font-size:14px;
	padding: 0;
}

.ticket-head-row .id {
	width: 52px;
	font-size:14px;
	color: #333;
	text-align: center;
}

.priority span {
	color:#fff;
	font-weight:normal;
	padding: 10px 12px;
	font-size: 14px;
}

.ticket-table .ticket-row .ticket-photos{
	width:40px;
	height:40px;
	line-height: 40px;
	background-color: #ffffff;
}

.ticket-row:hover {
	filter: brightness(95%);
}

.ticket-pagination {
	width:100%;
}

.ticket-pagination nav {
	display:flex;
	margin-top:10px;
	border-bottom:none;
}

.ticket-pagination nav ul.pagination {
	margin:0 auto;
}

.ticket-pagination .page-link {
	color:#333;
}

/* My View */

.myview .ticket-head-row .id {
	width: 90px;
	font-weight: bold;
	text-align: center;
	font-size:14px;
}

.myview .ticket-head-row .title {
	font-size:14px;
	width:688px;
}

.myview .ticket-head-row .status {
	width: 160px;
	text-align: center;
}

.myview .ticket-head-row .dates {
	width: 120px;
	text-align: left;
	font-size:14px;
}

.myview .ticket-row .id {
	width: 90px;
	font-weight: bold;
	font-size:14px;
	color: #333;
}

.myview .ticket-row .id span{
	padding: 10px 20px;
    font-weight: normal;
    border:solid 1px #cecece;
}

.myview .ticket-row .title {
	width: 688px;
	text-align: left;
	font-size:14px;
}

.myview .ticket-row .status {
	width: 160px;
	text-align: center;
	font-size:14px;
}

.myview .ticket-row .dates {
	width: 120px;
	text-align: left;
	font-size:14px;
}




/* Ticket List End */

.ticket-id {
	background-color: #343a40;
    color: #fff;
    padding: 12px 12px;
    line-height: 30px;
    margin-right: 10px;
    letter-spacing: 1px;
    height: 50px;
    font-weight:500;
}

.ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-content, .ticket-comments, .ticket-comments-dark, .ticket-comments-note {
	clear: both;
	position:relative;
	font-size:15px;
	padding:20px 15px;
	background-color: #fbfbfb;
}

.ticket-comments-dark {
	background-color: #f5f5f5;
}

.deleted {
	background: repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.03) 10px, rgba(0, 0, 0, 0) 10px, rgba(0, 0, 0, 0.0) 20px);
}

.ticket-comments-note {
	background-color: #fff3cd;
	color: #856404;
}

.ticket-header {
	position:relative;
    height: 50px;
    background-color: #f5f5f5;
}

.ticket-header-left {
	float:left;
	max-width:880px;
}

.ticket-header-right {
	line-height: 22px;
	text-align:right;
}

.ticket-header-right .btn {
	border-radius: 0;
	border-bottom: 0;
	height: 50px;
	width: 50px;
    line-height: 35px;
    font-size:20px;
    border-bottom: solid 3px rgba(0, 0, 0, 0.1);
}

.large.tooltip-inner {
    min-width: 380px;
}

.user-img {
    width: 32px;
    border-radius: 50%;
    border: solid 1px #e4e4e4;
    margin-right:10px;
}

.ticket-log {
	float:right;
	font-size:14px;
	position: absolute;
    bottom: 10px;
    right: 10px;
}

.ticket-items {
	margin-bottom:20px;	
}

.ticket-attachment {
	margin-right:10px;
}

.ticket-attachment {
	position:relative;
	display:inline-block;
	height:50px;
	background-color:#eaeaea;
}

.ticket-attachment a.remove-attachment {
	position: absolute;
    right: 0px;
    top: 0px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    font-weight: 100;
    font-size: 10px;
    text-align: center;
    display: inline-block;
    color:rgba(0, 0, 0, 0.5);
}

.ticket-settings a, .ticket-attachment a{
	margin-bottom:3px;
}

.ticket-footer {
	background-color: #f5f5f5;
	padding:18px 10px;
	margin:0px;
}

.ticket-footer .properties-left strong:first-child {
	min-width:60px;
	display: inline-block;
}
.ticket-footer .properties-center strong:first-child {
	min-width:65px;
	display: inline-block;
}
.ticket-footer .properties-right strong:first-child {
	min-width:115px;
	display: inline-block;
}

.ticket-attachment img {
	max-width:50px;
}

.ticket-footer .ticket-status {
	float: left;
    line-height: 2;
}

.status-dropdown a#dropdownMenuLink {
	background-color:#fff;
}

/* random background image for each ".ticket-photos" colors: #EF9A9A, #F48FB1, #CE93D8, #B39DDB, #7986CB, #90CAF9, #81D4FA, #80DEEA, #80CBC4, #A5D6A7, #C5E1A5, #E6EE9C, #FFF59D, #FFE082, #FFCC80, #FFAB91, #BCAAA4, #CFD8DC*/
.ticket-photos {
	display: inline-block;
    margin: 0px 1px;
    width: 30px;
    border-radius: 50%;
    color: rgba(0, 0, 0, 0.7);
    font-size: 14px;
    font-weight:normal;
    text-align: center;
    line-height: 30px;
}

.ticket-photo-img {
    width: 30px;
    border-radius: 50%;
    border: solid 1px #eaeaea;
}

.ticket-footer .col-md:last-child {
	max-width:270px;
}

.ticket-footer .priority {

}

.ticket-footer .properties-center {
	max-width:320px;
}

.comment-btns {
	position: absolute;
    top: 0;
    right: 12px;
    line-height: 22px;
}

.comment-btns .btn {
	border-radius: 0;
    border-bottom: 0;
    width: 24px;
    font-size: 16px;
}

.comment-btns .btn:first-child i {
	color:#343a40;
}

.comment-btns .btn:last-child i {
	color:#dc3545;
}

.ticket-comments-header {
	height: 50px;
	font-size: 26px;
	color:#fff;
  	background-color: #343a40;
  	line-height: 2;
    padding-left: 15px;
}

.ticket-comment-area {
	 background-color: #f5f5f5;
	 padding:20px 15px;
}

.ticket-comment-area .row {
	padding:0px;
	margin:0px;
}

.ticket-comment-area .row .col-md:first-child {
	padding-left:0px;
}

.ticket-comment-area .row .col-md:last-child {
	padding-right:0px;
	text-align:right;
}

.ticket-comment-area textarea {
	width: 100%;
    height: 160px;
    padding:5px;
    font-weight:300;
}

.ticket-comment-area .form-check {
	margin-top: 0.5rem;
}

.ticket-comment-area .form-check .form-check-label {
	padding:0px;
}

.comment-text, .ticket-items {
	display: inline-block;
	margin-bottom:30px;
}

.comment-text span strong, .ticket-text span p strong {
	font-weight:bold;
}

input[type="file"] {
    display: none;
}

.file-upload {
    display: inline-block;
    padding: 8px 14px;
    cursor: pointer;
    color:#fff;
    background-color:#212529;
    border-radius: 8px;
    outline: none;
    border-bottom: solid 2px rgba(0, 0, 0, 0.1);
}

.file-upload:hover {
	background-color:#505050;
}

.status-dropdown {
	width:250px;
}

.status-dropdown .ticket-status {
	float: left;
    line-height: 2.5;
    margin-right: 20px;
}

.ticket-tag  {
	background-color: #d4d4d4;
    padding: 2px 8px;
    margin-right: 1px;
    font-size: 12px;
    font-weight: normal;
    margin-bottom: 5px;
    display: inline-block;
}

.ticket-edit-footer {
	position:relative;
	line-height: 2;
}

.ticket-edit-footer input {
	margin-right:5px;
}

.ticket-edit-footer div {
	border:solid 1px red;
}

.ticket-edit-footer .form-check-label {
	padding:0px;
}

.Highest {background-color: #ef5350; color:#fff; border:none;}
.High {background-color: #FF8A65; color:#fff; border:none;}
.Medium {background-color: #FFD54F; color:#fff; border:none;}
.Low {background-color: #81C784; color:#fff; border:none;}
.Lowest {background-color: #AED581; color:#fff; border:none;}

.ticket-cell.priority .Highest {
	background-image: url(../images/highest.svg);
	background-color: transparent;
	background-repeat: no-repeat;
	background-position: center;
	width: 22px;
	background-size: 22px;
}
.ticket-cell.priority .High {
	background-image: url(../images/high.svg);
	background-color: transparent;
	background-repeat: no-repeat;
	background-position: center;
	width: 22px;
	background-size: 22px;
}
.ticket-cell.priority .Medium {
	background-image: url(../images/medium.svg);
	background-color: transparent;
	background-repeat: no-repeat;
	background-position: center;
	width: 22px;
	background-size: 22px;
}
.ticket-cell.priority .Low {
	background-image: url(../images/low.svg);
	background-color: transparent;
	background-repeat: no-repeat;
	background-position: center;
	width: 22px;
	background-size: 22px;
}
.ticket-cell.priority .Lowest {
	background-image: url(../images/lowest.svg);
	background-color: transparent;
	background-repeat: no-repeat;
	background-position: center;
	width: 22px;
	background-size: 22px;
}

/** KENDO Grid Styles **/
.one-line {
	white-space: nowrap;
}

.multi-line {
	white-space: normal;
}

.bool-line {
	text-align: center;
	text-transform: capitalize;
}

.right-line {
	text-align: right;
}

.center-line {
	text-align: center;
}

#searchTitle input {
	border: none;
}

input[name="searchTitle"] {
	border: none;
	width: 140px;
}

input.searchbox {
	width: 120px;
}

.search-border {
	border:solid 2px rgba(0, 0, 0, 0.1);
	border-top-left-radius: 8px;
	border-bottom-left-radius: 8px;
	border-right: none;
	height: 33px;
}

#searchButton{
	border-bottom-left-radius: 0;
	border-top-left-radius: 0;
	height: 33px;
	color: #202020;
	background-color: #f8f9fa;
	border: solid 2px rgba(0, 0, 0, 0.1);
	border-left: none;
}

.multiselect-container {
	transform: translate3d(0px, 0px, 0px) !important;
	max-height: 530px;
	overflow-y: auto;
}

.myview .k-textbox{
	height: 33px;
	border-top-left-radius: inherit;
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
	border-bottom-left-radius: inherit;
}

.myview #searchButton{
	height:23px;

}

.myView-new-ticket-btn{
	height: 23px;
}

.ticket-table .t-filter .k-checkbox-label{
	font-weight: 500;
	font-size: 1rem;
}

.ticket-table .t-filter .k-checkbox-label:before {
	border: solid 1px #cecece;
	background-color: #fff;
	border-radius: 3px;
}

.ticket-table .t-filter .k-checkbox:checked+.k-checkbox-label:before {
	background-color: #fff;
	border-color: #03A9F4;
	color: #03A9F4;
}

.ticket-filters .btn:not(.btn-dark) {
	border-bottom: 1px solid rgb(206, 206, 206);
}

/* BG Colors */

.assignee .ticket-photos {
	background-color: #808080 !important;
	color: #ffffff !important;
}

.ticket-cell .bg-success {
	background-color: #66aa76 !important;
	display: inline-block;
}

.ticket-cell .bg-warning {
	background-color: #f6ce59 !important;
	color: #212121;
	display: inline-block;
}

.ticket-cell .bg-danger {
	background-color: #e47883 !important;
	display: inline-block;
}

.rounded-pill {
	border-radius: 16px;
	display: inline-block;
}

.bg-success-light {
	background-color: #F0F8F0 !important;
	border-top:solid 1px #d7eedd;
	border-bottom:solid 1px #d7eedd;
}
.bg-warning-light {
	background-color: #FCF8EC !important;
	border-top:solid 1px #dedac5;
	border-bottom:solid 1px #dedac5;
}
.bg-danger-light {
	background-color: #FFF4F4 !important;
	border-top:solid 1px #e5c8c8;
	border-bottom:solid 1px #e5c8c8;
}

.bg-success-light .rounded,
.bg-warning-light .rounded,
.bg-danger-light .rounded,
.bg-status.rounded{
	border-radius: 20px !important;
}

/* ==========================================================
   AI SUMMARY BUTTON - Sparkle Star Theme
   ========================================================== */

/* Button base - high specificity to override .ticket-header-right .btn */
.ticket-header-right .btn.btn-ai-magic {
    position: relative;
    overflow: hidden;
    z-index: 2;
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 40%, #a78bfa 100%);
    border: none;
    border-bottom: solid 3px rgba(91, 33, 182, 0.4);
    border-radius: 0;
    color: #fff;
    height: 50px;
    width: 50px;
    line-height: 43px;
    font-size: 20px;
    margin: 0;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* Sparkle icon container */
.ai-sparkle-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

/* Stars positioning */
.ai-star {
    position: absolute;
    color: #fff;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.6));
}

.ai-star-1 {
    top: 0;
    left: 1px;
}

.ai-star-2 {
    top: 2px;
    right: -1px;
}

.ai-star-3 {
    bottom: 1px;
    right: 3px;
}

/* Sequential star lighting animation */
.ai-star-1 {
    animation: aiStarGlow1 3s ease-in-out infinite;
}
.ai-star-2 {
    animation: aiStarGlow2 3s ease-in-out infinite;
}
.ai-star-3 {
    animation: aiStarGlow3 3s ease-in-out infinite;
}

@keyframes aiStarGlow1 {
    0%, 100% { opacity: 0.5; transform: scale(0.85); filter: drop-shadow(0 0 2px rgba(255,255,255,0.3)); }
    20%, 35% { opacity: 1; transform: scale(1.15); filter: drop-shadow(0 0 6px rgba(255,255,255,0.9)); }
}
@keyframes aiStarGlow2 {
    0%, 100% { opacity: 0.5; transform: scale(0.85); filter: drop-shadow(0 0 2px rgba(255,255,255,0.3)); }
    35%, 50% { opacity: 1; transform: scale(1.2); filter: drop-shadow(0 0 6px rgba(255,255,255,0.9)); }
}
@keyframes aiStarGlow3 {
    0%, 100% { opacity: 0.5; transform: scale(0.85); filter: drop-shadow(0 0 2px rgba(255,255,255,0.3)); }
    50%, 65% { opacity: 1; transform: scale(1.25); filter: drop-shadow(0 0 6px rgba(255,255,255,0.9)); }
}

/* Shimmer sweep across button */
.btn-ai-magic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    border-radius: 0;
    background: linear-gradient(
        120deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.18) 50%,
        transparent 60%,
        transparent 100%
    );
    z-index: 3;
    pointer-events: none;
    animation: aiShimmer 5s ease-in-out infinite;
}

@keyframes aiShimmer {
    0%   { transform: translateX(-100%); }
    15%  { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

/* Hover */
.ticket-header-right .btn.btn-ai-magic:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 30%, #a78bfa 100%);
    box-shadow: none;
}

.btn-ai-magic:hover .ai-star-1 {
    animation: aiStarHover1 1.6s ease-in-out infinite;
}
.btn-ai-magic:hover .ai-star-2 {
    animation: aiStarHover2 1.6s ease-in-out infinite;
}
.btn-ai-magic:hover .ai-star-3 {
    animation: aiStarHover3 1.6s ease-in-out infinite;
}

@keyframes aiStarHover1 {
    0%, 100% { opacity: 0.6; transform: scale(0.9); }
    25%, 40% { opacity: 1; transform: scale(1.3); filter: drop-shadow(0 0 8px #fff); }
}
@keyframes aiStarHover2 {
    0%, 100% { opacity: 0.6; transform: scale(0.9); }
    35%, 50% { opacity: 1; transform: scale(1.35); filter: drop-shadow(0 0 8px #fff); }
}
@keyframes aiStarHover3 {
    0%, 100% { opacity: 0.6; transform: scale(0.9); }
    50%, 65% { opacity: 1; transform: scale(1.4); filter: drop-shadow(0 0 8px #fff); }
}

.btn-ai-magic:hover::before {
    animation: aiShimmer 1.5s ease-in-out infinite;
}

/* Active/press */
.ticket-header-right .btn.btn-ai-magic:active {
    background: linear-gradient(135deg, #5b21b6 0%, #6d28d9 40%, #7c3aed 100%);
}

/* Generating state - stays purple, no cyan */
.ticket-header-right .btn.btn-ai-magic.ai-generating {
    pointer-events: none;
    cursor: wait;
    background: linear-gradient(135deg, #5b21b6, #7c3aed, #a78bfa, #7c3aed, #5b21b6);
    background-size: 300% 300%;
    box-shadow: none;
    animation: aiGenGradient 2.5s ease infinite;
}

@keyframes aiGenGradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-ai-magic.ai-generating .ai-star-1 {
    animation: aiStarSpin 1.8s linear infinite;
}
.btn-ai-magic.ai-generating .ai-star-2 {
    animation: aiStarSpin 1.8s linear infinite 0.3s;
}
.btn-ai-magic.ai-generating .ai-star-3 {
    animation: aiStarSpin 1.8s linear infinite 0.6s;
}

@keyframes aiStarSpin {
    0%   { opacity: 0.4; transform: scale(0.7) rotate(0deg); }
    50%  { opacity: 1; transform: scale(1.3) rotate(180deg); filter: drop-shadow(0 0 4px #c4b5fd); }
    100% { opacity: 0.4; transform: scale(0.7) rotate(360deg); }
}

.btn-ai-magic.ai-generating::before {
    animation: aiShimmer 0.8s linear infinite;
    background: linear-gradient(
        120deg,
        transparent 0%,
        transparent 25%,
        rgba(167, 139, 250, 0.2) 50%,
        transparent 75%,
        transparent 100%
    );
}

/* ==========================================================
   AI SUMMARY PANEL  --  "Frost Card" design
   ========================================================== */

/* Outer wrapper -- handles slide animation via jQuery */
#aiSummaryPanel {
    padding: 0;
}

/* Card container */
.ai-summary-panel {
    position: relative;
    background: linear-gradient(160deg, #ffffff 0%, #ffffff 50%, #fcfbff 100%);
    border: 1px solid rgba(124, 58, 237, 0.10);
    border-radius: 10px;
    padding: 20px 24px;
    margin: 12px 0 4px;
    box-shadow:
        0 1px 3px rgba(124, 58, 237, 0.06),
        0 4px 16px rgba(124, 58, 237, 0.04),
        0 0 0 1px rgba(124, 58, 237, 0.03);
    overflow: hidden;
}

/* Animated top-edge gradient accent -- slow breathing cycle */
.ai-summary-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7c3aed, #a78bfa, #c4b5fd, #a78bfa, #7c3aed);
    background-size: 200% 100%;
    border-radius: 10px 10px 0 0;
    opacity: 0.75;
    animation: aiTopBarShift 8s ease-in-out infinite;
}

@keyframes aiTopBarShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Shimmer overlay -- visible only during loading, hidden when content shown */
.ai-summary-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 0%,
        transparent 40%,
        rgba(167, 139, 250, 0.07) 45%,
        rgba(124, 58, 237, 0.05) 50%,
        rgba(167, 139, 250, 0.07) 55%,
        transparent 60%,
        transparent 100%
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ai-summary-panel.ai-loading::after {
    opacity: 1;
    animation: aiCardShimmer 2s ease-in-out infinite;
}

@keyframes aiCardShimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Header row */
.ai-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(124, 58, 237, 0.08);
}

/* "AI Summary" badge label */
.ai-summary-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #7c3aed;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    background: rgba(124, 58, 237, 0.07);
    padding: 5px 12px;
    border-radius: 6px;
    line-height: 1;
}

.ai-summary-label i,
.ai-summary-label svg {
    font-size: 12px;
    opacity: 0.85;
}

/* Close button */
.ai-summary-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: #9ca3af;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
    background: transparent;
}

.ai-summary-close:hover {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.08);
    text-decoration: none;
}

.ai-summary-close:active {
    transform: scale(0.92);
}

/* ------- Loading state ------- */
#summaryLoading {
    padding: 32px 20px;
    text-align: center;
}

.ai-loading-dots {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.ai-loading-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a78bfa;
    animation: aiDotPulse 1.4s ease-in-out infinite;
}

.ai-loading-dots span:nth-child(1) { animation-delay: 0s; }
.ai-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiDotPulse {
    0%, 80%, 100% {
        transform: scale(0.5);
        opacity: 0.3;
    }
    40% {
        transform: scale(1.1);
        opacity: 1;
        background: #7c3aed;
    }
}

/* Shimmering "Generating summary..." text */
.ai-loading-text {
    margin-top: 14px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    background: linear-gradient(90deg, #a78bfa 0%, #7c3aed 40%, #c4b5fd 60%, #a78bfa 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: aiTextShimmer 3s ease-in-out infinite;
}

@keyframes aiTextShimmer {
    0%   { background-position: 100% 50%; }
    100% { background-position: -100% 50%; }
}

/* ------- Summary content area ------- */
#summaryText {
    line-height: 1.7;
    font-size: 13.5px;
    color: #374151;
}

/* Section blocks */
.ai-section {
    padding: 12px 0;
}

.ai-section + .ai-section {
    border-top: 1px solid rgba(124, 58, 237, 0.06);
}

.ai-section:last-child {
    padding-bottom: 0;
}

/* Also handle direct div children for plain-text fallback */
#summaryText > div + div {
    border-top: 1px solid rgba(124, 58, 237, 0.06);
    padding-top: 12px;
}

/* Section labels -- bold headings like OpenPhone style */
.ai-section-label {
    font-weight: 700;
    font-size: 13px;
    color: #1f2937;
    margin-bottom: 8px;
    line-height: 1.3;
}

/* Single-line section text */
.ai-section-text {
    color: #374151;
    font-size: 13.5px;
    line-height: 1.65;
    margin: 0;
}

.ai-section-text strong {
    color: #1f2937;
    font-weight: 600;
}

/* Bullet list -- purple dots, clean spacing */
.ai-bullet-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ai-bullet-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    line-height: 1.6;
    color: #374151;
    font-size: 13.5px;
}

.ai-bullet-list li:last-child {
    margin-bottom: 0;
}

.ai-bullet-list li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7c3aed;
}

.ai-bullet-list li strong {
    color: #1f2937;
    font-weight: 600;
}

/* Error state */
.ai-summary-error {
    color: #dc2626;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-summary-error i {
    font-size: 14px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .btn-ai-magic,
    .btn-ai-magic:hover,
    .btn-ai-magic.ai-generating,
    .btn-ai-magic::before,
    .ai-star,
    .ai-loading-dots span,
    .ai-summary-close,
    .ai-summary-panel::before,
    .ai-summary-panel::after,
    .ai-loading-text {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
    .btn-ai-magic {
        background: #7c3aed !important;
        box-shadow: none;
    }
    .ai-star { opacity: 1 !important; }
    .ai-loading-text {
        -webkit-text-fill-color: #a78bfa;
        color: #a78bfa;
    }
}