/* ========================================
   MODAL FOOTER BUTTONS - STANDARDIZED
   ======================================== */

/* Modal Footer Buttons Container */
.tk-modal-footer-btns {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* Full width on mobile */
@media (max-width: 576px) {
    .tk-modal-footer-btns {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .tk-modal-footer-btns button,
    .tk-modal-footer-btns a {
        width: 100%;
    }
}

/* Outline Button (Cancel) - 30% width */
.tk-btn-outline {
    flex: 0 0 auto;
    min-width: 120px;
    padding: 12px 24px;
    background: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    color: #6b7280;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    line-height: 1.5;
}

.tk-btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tk-btn-outline:active {
    transform: translateY(0);
}

.tk-btn-outline i {
    font-size: 16px;
    color: currentColor;
}

/* Primary Button (Submit/Save) - 70% width */
.tk-modal-footer-btns .tk-btn {
    flex: 1 1 auto;
    min-width: 180px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #ee4710 0%, #d6400e 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    line-height: 1.5;
    box-shadow: 0 4px 6px rgba(238, 71, 16, 0.2);
}

.tk-modal-footer-btns .tk-btn:hover {
    background: linear-gradient(135deg, #d6400e 0%, #be390c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(238, 71, 16, 0.3);
}

.tk-modal-footer-btns .tk-btn:active {
    transform: translateY(0);
}

.tk-modal-footer-btns .tk-btn i {
    font-size: 16px;
    color: #ffffff;
}

.tk-modal-footer-btns .tk-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* For inline content buttons (side by side equal) */
.tk-savebtn.tk-savebtnfeed,
.tk-savebtn.tk-btnwrapper {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.tk-savebtn.tk-savebtnfeed .tk-btn,
.tk-savebtn.tk-btnwrapper .tk-btn {
    flex: 1 1 auto;
    min-width: 0;
}

/* Loading state */
.tk-modal-footer-btns .tk-btn .spinner-border {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* Icon styles */
.tk-modal-footer-btns .icon-x,
.tk-modal-footer-btns .icon-check,
.tk-modal-footer-btns .icon-check-circle,
.tk-modal-footer-btns .icon-alert-circle,
.tk-modal-footer-btns .icon-arrow-right {
    margin-right: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tk-modal-footer-btns .tk-btn,
    .tk-btn-outline {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Alternative button colors for specific actions */
.tk-modal-footer-btns .tk-btn.tk-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2);
}

.tk-modal-footer-btns .tk-btn.tk-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 12px rgba(239, 68, 68, 0.3);
}

.tk-modal-footer-btns .tk-btn.tk-btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.2);
}

.tk-modal-footer-btns .tk-btn.tk-btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 6px 12px rgba(245, 158, 11, 0.3);
}

/* For standalone save buttons (not in modal footer) */
.tk-savebtn .tk-btn:not(.tk-modal-footer-btns .tk-btn) {
    width: 100%;
    max-width: 100%;
}

/* ========================================
   SIDEBAR USER PROFILE - RESPONSIVE NAME
   ======================================== */

/* Ensure user login section handles long names properly */
.tk-userlogin {
    overflow: hidden;
}

.tk-userlogin .tk-hasbalance {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    flex-wrap: nowrap;
}

.tk-userlogin .tk-hasbalance > img {
    flex-shrink: 0;
    min-width: 50px;
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 10px;
}

.tk-userlogin .tk-walletinfo {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.tk-userlogin .tk-walletinfo h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #191919;
    white-space: normal !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
    max-width: 100%;
    hyphens: auto;
}

.tk-userlogin .tk-walletinfo span {
    font-size: 12px;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* When sidebar is collapsed/folded */
.tk-menufold .tk-userlogin .tk-walletinfo {
    display: none;
}

.tk-menufold .tk-userlogin .tk-hasbalance {
    justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 1199px) {
    .tk-userlogin .tk-walletinfo h4 {
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .tk-userlogin .tk-hasbalance {
        gap: 10px;
    }
    
    .tk-userlogin .tk-hasbalance > img {
        width: 45px;
        height: 45px;
        min-width: 45px;
    }
    
    .tk-userlogin .tk-walletinfo h4 {
        font-size: 12px;
    }
}
