/**
 * Frontend CSS for Secure Documents Viewer.
 *
 * @package JipSDV
 */

/* Wrapper */
.jip-sdv-wrapper {
	margin: 20px 0;
}

/* Open Modal Button */
.jip-sdv-open-modal {
	background: #0073aa;
	color: #fff;
	border: none;
	padding: 12px 24px;
	font-size: 16px;
	cursor: pointer;
	border-radius: 4px;
	transition: background 0.3s ease;
}

.jip-sdv-open-modal:hover {
	background: #005177;
}

/* Modal */
.jip-sdv-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	display: none;
}

.jip-sdv-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	cursor: pointer;
}

.jip-sdv-modal-content {
	position: relative;
	background: #fff;
	max-width: 500px;
	margin: 100px auto;
	padding: 40px;
	border-radius: 8px;
	box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
	z-index: 10000;
}

.jip-sdv-modal-close {
	position: absolute;
	top: 15px;
	right: 15px;
	background: none;
	border: none;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	color: #999;
	padding: 0;
	width: 32px;
	height: 32px;
	transition: color 0.3s ease;
	padding: 0 !important;
}

.jip-sdv-modal-close:hover {
	color: #333;
}

.jip-sdv-modal-content h2 {
	margin: 0 0 15px;
	font-size: 24px;
	color: #333;
}

.jip-sdv-modal-content p {
	margin: 0 0 20px;
	color: #666;
	font-size: 14px;
}

/* Password Form */
.jip-sdv-password-form {
	margin-bottom: 15px;
}

.jip-sdv-password-input {
	width: 100%;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 16px;
	margin-bottom: 15px;
	box-sizing: border-box;
}

.jip-sdv-password-input:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 1px #0073aa;
}

.jip-sdv-submit-password {
	background: #0073aa;
	color: #fff;
	border: none;
	padding: 12px 24px;
	font-size: 16px;
	cursor: pointer;
	border-radius: 4px;
	width: 100%;
	transition: background 0.3s ease;
}

.jip-sdv-submit-password:hover {
	background: #005177;
}

.jip-sdv-submit-password:disabled {
	background: #ccc;
	cursor: not-allowed;
}

/* Messages */
.jip-sdv-message {
	padding: 12px;
	border-radius: 4px;
	margin-top: 15px;
	font-size: 14px;
}

.jip-sdv-message.jip-sdv-success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.jip-sdv-message.jip-sdv-error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* Documents List */
.jip-sdv-documents-list {
	margin-top: 30px;
}

.jip-sdv-documents-list h3 {
	font-size: 22px;
	margin: 0 0 20px;
	color: #333;
}

.jip-sdv-documents-container {
	margin-top: 15px;
}

.jip-sdv-loading,
.jip-sdv-error {
	color: #666;
	font-size: 14px;
}

.jip-sdv-error {
	color: #721c24;
}

/* Documents Grid */
.jip-sdv-documents-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 20px;
}

.jip-sdv-document-item {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	transition: all 0.3s ease;
}

.jip-sdv-document-item:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.jip-sdv-document-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 30px 20px;
	text-decoration: none;
	color: #333;
}

.jip-sdv-document-icon {
	font-size: 48px;
	color: #0073aa;
	margin-bottom: 10px;
}

.jip-sdv-document-extension {
	font-size: 12px;
	font-weight: bold;
	color: #fff;
	background: #0073aa;
	padding: 4px 12px;
	border-radius: 12px;
	margin-bottom: 10px;
}

.jip-sdv-document-title {
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	color: #333;
	word-break: break-word;
}

.jip-sdv-document-link:hover .jip-sdv-document-title {
	color: #0073aa;
}

/* Responsive */
@media (max-width: 768px) {
	.jip-sdv-modal-content {
		margin: 50px 20px;
		padding: 30px 20px;
	}

	.jip-sdv-documents-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 15px;
	}
}
