/**
 * WP LINE Login for WooCommerce Styles
 *
 * @package WooCommerce_LINE_Integration
 * @version 1.0.0
 */

/* LINE Login Button Separator */
.woocommerce-line-login-separator {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.woocommerce-line-login-separator::before,
.woocommerce-line-login-separator::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: #e0e0e0;
}

.woocommerce-line-login-separator::before {
    left: 0;
}

.woocommerce-line-login-separator::after {
    right: 0;
}

.woocommerce-line-login-separator span {
    background: #fff;
    padding: 0 10px;
    color: #666;
    font-size: 14px;
}

/* LINE Login Button Wrapper */
.woocommerce-line-login-wrapper {
    text-align: center;
    margin: 20px 0;
}

/* LINEログインボタン - 標準サイズ長文テキスト */
.woocommerce-line-login-wrapper .line-login-btn {
    display: inline-flex;
    align-items: center;
    background-color: #06C755;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease;
    position: relative;
    overflow: hidden;
    height: 44px;
    max-width: 300px;
}

/* ホバー効果 */
.woocommerce-line-login-wrapper .line-login-btn:hover {
    background-color: #06C755;
}

.woocommerce-line-login-wrapper .line-login-btn:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

/* アクティブ（クリック）効果 */
.woocommerce-line-login-wrapper .line-login-btn:active::before {
    background-color: rgba(0, 0, 0, 0.3);
}

/* アイコン部分 */
.woocommerce-line-login-wrapper .line-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.woocommerce-line-login-wrapper .line-logo {
    width: 28px;
    height: 28px;
}

/* 縦線 - ボタンの高さと同じ */
.woocommerce-line-login-wrapper .divider {
    width: 1px;
    align-self: stretch;
    background-color: rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

/* テキスト部分 */
.woocommerce-line-login-wrapper .line-text {
    padding: 0 28px;
    font-size: 14px;
    white-space: nowrap;
    font-weight: 700;
    font-family: Helvetica, Arial, sans-serif;
}

/* LINE Connection Page */
.woocommerce-line-connection {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
}

.woocommerce-line-connection h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
}

.line-connection-messages {
    margin-bottom: 20px;
}

.line-connection-status {
    padding: 20px;
    border-radius: 5px;
    background: #f9f9f9;
}

.line-connection-status.linked {
    border: 2px solid #06c755;
}

.line-connection-status.unlinked {
    border: 2px solid #ddd;
}

.line-connection-info {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.line-profile-picture {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #06c755;
}

.line-profile-details {
    flex: 1;
}

.line-profile-details p {
    margin: 8px 0;
}

.line-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px !important;
}

.line-status-badge.connected {
    background-color: #e6f9ef;
    color: #06c755;
}

.line-status-badge.disconnected {
    background-color: #f5f5f5;
    color: #999;
}

.line-status-badge .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.line-friend-status.is-friend {
    color: #06c755;
}

.line-friend-status.not-friend {
    color: #999;
}

.line-connection-description {
    color: #666;
    margin-bottom: 20px;
}

.line-connection-actions {
    margin-top: 20px;
}

/* LINE連携ページのボタン */
.line-connection-actions .line-login-btn {
    display: inline-flex;
    align-items: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease;
    position: relative;
    overflow: hidden;
    height: 44px;
    max-width: 300px;
}

/* 未連携ボタン（緑） */
.line-connection-actions .line-login-btn.unlinked {
    background-color: #06C755;
    color: #fff !important;
}

.line-connection-actions .line-login-btn.unlinked:hover {
    background-color: #06C755;
}

.line-connection-actions .line-login-btn.unlinked:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.line-connection-actions .line-login-btn.unlinked:active::before {
    background-color: rgba(0, 0, 0, 0.3);
}

/* 連携済みボタン（赤） */
.line-connection-actions .line-login-btn.linked {
    background-color: #f44336;
    color: #fff !important;
}

.line-connection-actions .line-login-btn.linked:hover {
    background-color: #f44336;
}

.line-connection-actions .line-login-btn.linked:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.line-connection-actions .line-login-btn.linked:active::before {
    background-color: rgba(0, 0, 0, 0.3);
}

.line-connection-actions .line-login-btn.linked.disabled {
    background-color: #ccc;
    color: #666 !important;
    cursor: not-allowed;
    pointer-events: none;
}

/* アイコン部分 */
.line-connection-actions .line-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 44px;
    flex-shrink: 0;
}

.line-connection-actions .line-logo {
    width: 28px;
    height: 28px;
    margin-left: -4px;
}

/* 縦線 */
.line-connection-actions .divider {
    width: 1px;
    align-self: stretch;
    background-color: rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

/* テキスト部分 */
.line-connection-actions .line-text {
    padding: 0 44px;
    font-size: 14px;
    white-space: nowrap;
    font-weight: 700;
    font-family: Helvetica, Arial, sans-serif;
}

/* LINE Login Messages */
.line-login-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.line-login-message.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.line-login-message.info {
    background-color: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #1565c0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .line-connection-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .line-profile-picture {
        margin-bottom: 10px;
    }

    .woocommerce-line-login-wrapper .line-login-btn,
    .line-connection-actions .line-login-btn {
        max-width: 100%;
    }
}
