/* 自定义UI组件样式 - 使用flex布局实现响应式 */

/* jquery-confirm弹框样式 - 使用flex布局实现居中和响应式 */
.gm-jconfirm {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Microsoft Yahei', sans-serif;
}

.gm-jconfirm .jconfirm-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    transition: opacity 0.4s;
}

.gm-jconfirm .jconfirm-box-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
}

.gm-jconfirm .jconfirm-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalIn 0.3s ease-out;
}

.gm-jconfirm .jconfirm-title {
    padding: 20px 24px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.gm-jconfirm .jconfirm-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

.gm-jconfirm .jconfirm-buttons {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.gm-jconfirm .jconfirm-buttons button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Microsoft Yahei', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2);
    outline: none;
    position: relative;
    overflow: hidden;
}

.gm-jconfirm .jconfirm-buttons button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.gm-jconfirm .jconfirm-buttons button:hover::before {
    left: 100%;
}

.gm-jconfirm .jconfirm-buttons button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gm-jconfirm .jconfirm-buttons button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.gm-jconfirm .jconfirm-buttons .btn-default {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.gm-jconfirm .jconfirm-buttons .btn-default:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.4);
}

.gm-jconfirm .jconfirm-buttons .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.gm-jconfirm .jconfirm-buttons .btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #6b8dd6 100%);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.gm-jconfirm .jconfirm-closeIcon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #999;
    transition: all 0.2s;
    z-index: 10;
}

.gm-jconfirm .jconfirm-closeIcon:hover {
    color: #666;
}

@keyframes modalIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes modalOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.9);
        opacity: 0;
    }
}

/* 自定义下拉框样式 */
.custom-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Microsoft Yahei', sans-serif;
    color: #333;
    background-color: #fff;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2);
    outline: none;
    position: relative;
}

.custom-select:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

/* 自定义下拉框选项样式 */
.custom-select option {
    padding: 12px 15px;
    background-color: #fff;
    color: #333;
    white-space: normal;
    word-wrap: break-word;
    font-size: 15px;
}

/* 表单控件通用样式 */
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Microsoft Yahei', sans-serif;
    color: #333;
    background-color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2);
    outline: none;
    box-sizing: border-box;
}

.form-control:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

/* 按钮通用样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Microsoft Yahei', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2);
    outline: none;
    box-sizing: border-box;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #dc3545 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #20c997 0%, #1e7e34 100%);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #6b8dd6 100%);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Bootstrap风格按钮尺寸 */
.btn-lg {
    padding: 14px 32px;
    font-size: 18px;
    border-radius: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

/* Bootstrap风格轮廓按钮 */
.btn-outline-danger {
    background: transparent;
    border: 2px solid #dc3545;
    color: #dc3545;
}

.btn-outline-danger:hover {
    background: #dc3545;
    color: #fff;
}

.btn-outline-success {
    background: transparent;
    border: 2px solid #28a745;
    color: #28a745;
}

.btn-outline-success:hover {
    background: #28a745;
    color: #fff;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid #007bff;
    color: #007bff;
}

.btn-outline-primary:hover {
    background: #007bff;
    color: #fff;
}

.btn-outline-warning {
    background: transparent;
    border: 2px solid #ffc107;
    color: #ffc107;
}

.btn-outline-warning:hover {
    background: #ffc107;
    color: #fff;
}

/* Bootstrap风格按钮组 */
.btn-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0;
}

.btn-group .btn {
    border-radius: 0;
    margin-left: -1px;
}

.btn-group .btn:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Bootstrap风格按钮工具栏 */
.btn-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Bootstrap风格链接按钮 */
.btn-link {
    background: transparent;
    color: #007bff;
    border: none;
    padding: 12px 20px;
    box-shadow: none;
}

.btn-link:hover {
    background: transparent;
    color: #0056b3;
    text-decoration: underline;
    box-shadow: none;
    transform: none;
}

/* Bootstrap风格按钮状态 */
.btn:disabled,
.btn[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.btn:disabled:hover,
.btn[disabled]:hover {
    transform: none;
    box-shadow: none;
}

/* Bootstrap风格按钮加载状态 */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-top: -8px;
    margin-left: -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: btn-spin 0.6s linear infinite;
}

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

/* 表单组样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group > div {
    margin-bottom: 10px;
}

/* 分隔线样式 */
hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 20px 0;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .gm-jconfirm .jconfirm-box {
        max-width: 95%;
        width: 95%;
        max-height: 90vh;
    }
    
    .gm-jconfirm .jconfirm-title {
        padding: 16px 20px;
        font-size: 18px;
    }
    
    .gm-jconfirm .jconfirm-content {
        padding: 20px;
        font-size: 15px;
    }
    
    .gm-jconfirm .jconfirm-buttons {
        padding: 12px 20px;
    }
    
    .gm-jconfirm .jconfirm-buttons button {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .custom-select,
    .form-control {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .gm-jconfirm .jconfirm-box {
        max-width: 98%;
        width: 98%;
        max-height: 95vh;
        border-radius: 8px;
    }
    
    .gm-jconfirm .jconfirm-title {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .gm-jconfirm .jconfirm-content {
        padding: 16px;
        font-size: 14px;
    }
    
    .gm-jconfirm .jconfirm-buttons {
        padding: 10px 16px;
        flex-direction: column;
        gap: 8px;
    }
    
    .gm-jconfirm .jconfirm-buttons button {
        width: 100%;
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .custom-select,
    .form-control {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
}
