/**
 * Guest Bookmarks Pro - Frontend Styles
 */

/* === BOOKMARK BUTTON === */

.gbm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #4AA7AD;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #4AA7AD;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
}

.gbm-btn:hover {
    border-color: #2E8C92;
    color: #2E8C92;
    box-shadow: 0 4px 12px rgba(64, 128, 128, 0.15);
}

.gbm-btn.bookmarked {
    background: #00375A;
    border-color: #00375A;
    color: #ffffff;
}

.gbm-btn.bookmarked:hover {
    background: #022740;
    border-color: #022740;
}

.gbm-btn.gbm-loading {
    opacity: 0.6;
    cursor: wait;
    pointer-events: none;
}

.gbm-btn.gbm-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 8px;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border: 2px solid rgba(34, 113, 177, 0.3);
    border-top-color: #4AA7AD;
    border-radius: 50%;
    animation: gbm-spin 0.6s linear infinite;
}

@keyframes gbm-spin {
    100% { transform: rotate(360deg); }
}

.gbm-icon {
    font-size: 20px;
    line-height: 1;
}

.gbm-btn.bookmarked .gbm-icon {
    color: #ffffff;
}

.gbm-text {
    line-height: 1;
}

/* === MODAL TRIGGER BUTTON === */

.gbm-modal-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #fff;
    color: #4AA7AD;
    border: 2px solid #ddd;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-family: inherit;
}

.gbm-modal-trigger:hover {
    border-color: #1c7878;
    color: #1c7878;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.15);
}

.gbm-modal-trigger:active {
    transform: translateY(0);
}

.gbm-trigger-icon {
    font-size: 20px;
    line-height: 1;
}

.gbm-trigger-text {
    line-height: 1;
}

.gbm-trigger-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: #4AA7AD;
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}
.gbm-modal-trigger:hover .gbm-trigger-count{
  background: #FF8402;
}
/* === MODAL === */

.gbm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999999999999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 100px 0px;
}

.gbm-modal.gbm-modal-active {
    display: flex;
}

.gbm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    animation: gbm-fade-in 0.3s ease;
    cursor: pointer;
}

@keyframes gbm-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gbm-modal-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: gbm-slide-up 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes gbm-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === MODAL HEADER === */

.gbm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
    background: #fff;
}

.gbm-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.gbm-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #646970;
    border-radius: 4px;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: -5px;
    margin-top: -5px;
}

.gbm-modal-close:hover {
    background: #f0f0f1;
    color: #1d2327;
}

/* === MODAL BODY === */

.gbm-modal-body {
    padding:0px;
    overflow-y: auto;
    /*flex: 1;*/
    min-height: 0;
    background: #fff;
	height:450px;
}

.gbm-modal-body .lesezeichen-info{
   font-size:12px;
   background:lightblue;
   color:#333;
   opacity:0.6;
   word-wrap:break-word;
   hyphens:auto;
   text-align:center;
   padding:5px 10px;
   margin-bottom:10px;
}


.gbm-modal-body::-webkit-scrollbar {
    width: 8px;
}

.gbm-modal-body::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.gbm-modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.gbm-modal-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* === LIST === */

.gbm-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
	margin-top:10px;
	margin-left:10px;
	margin-right:10px;
	margin-bottom:10px;
}

.gbm-empty,
.gbm-loading-text,
.gbm-error {
    text-align: center;
    color: #646970;
    padding: 40px 20px;
    font-size: 14px;
}

.gbm-error {
    color: #dc3232;
}

.gbm-loading-text {
    color: #2271b1;
}

/* === LIST ITEM === */

.gbm-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: #F0F2F3;
    border-radius: 4px;
    border-left: 3px solid #4AA7AD;
    gap: 12px;
}

.gbm-item:hover {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.gbm-item.gbm-removing {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

.gbm-item-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.gbm-item-link:hover .gbm-item-title {
    color: #4AA7AD;
}

.gbm-item-title {
    font-weight: 500;
    color: #7f8c9f;
    font-size: 14px;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gbm-item-date {
    font-size: 12px;
    color: #7f8c9f;
}

.gbm-item-url {
    font-size: 11px;
    color: #646970;
    font-family: Consolas, Monaco, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gbm-item-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: #dc3232;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gbm-item-remove:hover {
    background: #a00;
}

/* === NOTIFICATIONS === */

.gbm-notification {
    position: fixed;
    bottom: 90px;
    right: 0px;
    padding: 12px 20px;
    background: #fff;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 999999999999999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 350px;
	min-width:150px;
    font-weight: 500;
    font-size: 14px;
}

.gbm-notification.gbm-show {
    opacity: 1;
    transform: translateX(0);
}

.gbm-notification.gbm-success {
    border-left: 3px solid #4AA7AD;
    color: #4AA7AD;
}

.gbm-notification.gbm-error {
    border-left: 3px solid #dc3232;
    color: #dc3232;
}

/* === RESPONSIVE === */

@media (max-width: 768px) {
    .gbm-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .gbm-icon {
        font-size: 18px;
    }
    
    .gbm-modal-trigger {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .gbm-trigger-icon {
        font-size: 18px;
    }
    
    .gbm-modal {
        padding: 60px 0px;
		
    }
    
    .gbm-modal-container {
        width: 100%;
		max-width:90vw;
        max-height: calc(100vh - 80px);
    }
    
    .gbm-modal-header {
        padding: 16px 20px;
    }
    
    .gbm-modal-header h2 {
        font-size: 18px;
    }
    
    .gbm-modal-body {
        padding: 0px;
    }
    
    .gbm-item {
        padding: 12px;
    }
    
    .gbm-item-title {
        font-size: 13px;
    }
    
    .gbm-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        top: 10px;
    }
}

@media (max-width: 480px) {
    .gbm-modal-trigger {
        padding: 8px 12px;
        font-size: 13px;
        gap: 6px;
    }
    
    .gbm-trigger-icon {
        font-size: 16px;
    }
    
    .gbm-trigger-text {
        display: none;
    }
    
    .gbm-trigger-count {
        min-width: 20px;
        height: 20px;
        font-size: 11px;
        padding: 0 6px;
    }
    
    .gbm-modal {
        padding: 40px 0px;
    }
    
    .gbm-modal-header {
        padding: 12px 15px;
    }
    
    .gbm-modal-header h2 {
        font-size: 16px;
    }
    
    .gbm-modal-close {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    
    .gbm-modal-body {
        padding: 0px;
    }
    
    .gbm-item {
        padding: 10px;
        flex-wrap: wrap;
    }
    
    .gbm-item-link {
        width: 100%;
    }
    
    .gbm-item-remove {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
    
    .gbm-item-url {
        font-size: 10px;
    }
}

/* === PRINT STYLES === */

@media print {
    .gbm-btn,
    .gbm-modal-trigger,
    .gbm-modal,
    .gbm-notification {
        display: none !important;
    }
}

/* === ACCESSIBILITY === */

.gbm-btn:focus,
.gbm-modal-trigger:focus,
.gbm-modal-close:focus,
.gbm-item-remove:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.gbm-btn:focus:not(:focus-visible),
.gbm-modal-trigger:focus:not(:focus-visible),
.gbm-modal-close:focus:not(:focus-visible),
.gbm-item-remove:focus:not(:focus-visible) {
    outline: none;
}

.gbm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* === LOADING STATE === */

.gbm-list.gbm-list-loading {
    opacity: 0.6;
    pointer-events: none;
}