/**
 * WooCommerce Inspiration Boards - Final Styles
 */

/* --- Header & Create Button --- */
.wib-my-account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #fdfdfd;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.wib-my-account-header h3 {
    margin: 0;
    font-size: 1.4em;
}

.ib-create-main-wrapper {
    margin-bottom: 20px;
    padding: 15px;
    background: #f0f6fc;
    border: 1px solid #cce5ff;
    border-radius: 6px;
}

/* --- Share Popup --- */
.ib-actions {
    position: relative;
}

.ib-share-toggle-btn {
    background: #fff;
    color: #007cba;
    border: 1px solid #007cba;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.ib-share-toggle-btn:hover {
    background: #007cba;
    color: #fff;
}

.ib-share-popup {
    display: none;
    position: absolute;
    top: 120%;
    left: 0;
    width: 300px;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 15px;
    border-radius: 8px;
    z-index: 9999;
}

.ib-share-popup.active {
    display: block;
}

.ib-share-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.ib-share-input {
    flex: 1;
    font-size: 12px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    color: #555;
    direction: ltr;
}

.ib-copy-btn {
    padding: 0 12px !important;
    font-size: 12px !important;
    background: #333 !important;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.ib-wa-btn {
    display: block;
    text-align: center;
    background: #25D366;
    color: #fff !important;
    text-decoration: none;
    padding: 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}
.ib-wa-btn:hover { background: #128C7E; }

/* --- Board Items & Accordion --- */
.ib-board-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    margin-bottom: 10px;
}

.ib-board-item.drag-over {
    border: 2px dashed #007cba;
    background-color: #f0f6fc;
}

.ib-board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    background: #fff;
    border-radius: 6px;
    transition: background 0.2s;
}

.ib-board-header:hover { background: #fafafa; }

.ib-board-item.is-open > .ib-board-header {
    border-bottom: 1px solid #eee;
    background: #fcfcfc;
    border-radius: 6px 6px 0 0;
}

.ib-title-wrapper { display: flex; align-items: center; gap: 10px; }
.ib-arrow { transition: transform 0.2s; color: #bbb; }
.ib-board-item.is-open .ib-arrow { transform: rotate(-90deg); } /* RTL Adjustment */

.ib-board-content {
    display: none;
    padding: 20px;
}

.ib-board-item.is-open > .ib-board-content {
    display: block;
    animation: fadeIn 0.3s;
}

/* --- Drag & Drop Cards (Updated Layout) --- */
.ib-drop-zone {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    min-height: 80px;
}

.ib-empty-msg {
    font-size: 13px; color: #bbb; font-style: italic; width: 100%; padding: 10px 0;
}

.ib-product-card {
    display: flex;
    flex-direction: column;
    width: 90px;
    min-height: 110px;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    cursor: grab;
    position: relative;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-decoration: none !important;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ib-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #dce0e3;
}

.ib-product-card:active { cursor: grabbing; }
.ib-product-card.dragging { opacity: 0.5; transform: scale(0.95); }

.ib-product-img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-bottom: 1px solid #f0f0f0;
    pointer-events: none;
}

.ib-product-name {
    padding: 6px;
    font-size: 11px;
    line-height: 1.3;
    text-align: center;
    color: #333;
    background: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Forms --- */
.ib-create-sub-board {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

.ib-inline-form { display: flex; gap: 10px; }
.ib-inline-form input[type="text"] { flex: 1; }

.ib-sub-boards {
    margin-top: 10px;
    padding-right: 20px;
    border-right: 2px solid #f0f0f0;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }